Showing 3 changed files with 6 additions and 23 deletions
-15
lib/Gitprep/Git.pm
... ...
@@ -260,7 +260,6 @@ sub blob {
260 260
   my $lines =[];
261 261
   while (my $line = $self->_dec(scalar <$fh>)) {
262 262
     chomp $line;
263
-    $line = $self->_tab_to_space($line);
264 263
     push @$lines, $line;
265 264
   }
266 265
   
... ...
@@ -1600,20 +1599,6 @@ sub _slurp {
1600 1599
   return $content;
1601 1600
 }
1602 1601
 
1603
-sub _tab_to_space {
1604
-  my ($self, $line) = @_;
1605
-  
1606
-  # Tab to space
1607
-  while ((my $pos = index($line, "\t")) != -1) {
1608
-    if (my $count = (2 - ($pos % 2))) {
1609
-      my $spaces = ' ' x $count;
1610
-      $line =~ s/\t/$spaces/;
1611
-    }
1612
-  }
1613
-
1614
-  return $line;
1615
-}
1616
-
1617 1602
 sub _unquote {
1618 1603
   my ($self, $str) = @_;
1619 1604
   
+6 -5
templates/include/diff_status_bar.html.ep
... ...
@@ -6,7 +6,7 @@
6 6
   my $diff_line_count = $add_line_count + $delete_line_count;
7 7
   my $diff_count_text;
8 8
   my $status = $diff_tree->{status};
9
-
9
+  
10 10
   $diff_count_text = "$add_line_count additions";
11 11
   $diff_count_text .= " & $delete_line_count deletions" if $delete_line_count > 0;
12 12
   my $tag = $fragment ? 'a' : 'span';
... ...
@@ -25,11 +25,12 @@
25 25
     $delete_block_count = 5;
26 26
   }
27 27
   
28
-  if ($add_line_count == 1) {
29
-    $add_block_count = 1;
28
+  if ($diff_line_count <= 5) {
29
+    $add_block_count = $add_line_count;
30
+    $delete_block_count = $delete_line_count;
30 31
   }
31
-  if ($delete_line_count == 1) {
32
-    $delete_block_count = 1;
32
+  if ($diff_tree->{binary}) {
33
+    $add_block_count = 5;
33 34
   }
34 35
 %>
35 36
 
-3
templates/include/diff_tree.html.ep
... ...
@@ -96,9 +96,6 @@
96 96
         % } elsif ($status eq 'R' || $status eq 'C') {
97 97
           
98 98
           <a href="#<%= "diff-$num" %>"><%= $diff_tree->{from_file} %> → <%= $file %></a>
99
-          % unless ($diff_tree->{similarity} == 100) {
100
-            with <%= $diff_tree->{similarity} %>
101
-          % }
102 99
         % }
103 100
         % if ($status ne 'A' && $status ne 'D' && $from_mode_str ne $mode_str) {
104 101
           <%= "100$from_mode_str → 100$mode_str" %>