@matheusbsbs / matheus-bagliano / commits / 4ed4a34716
Fork 0

Revert "gitweb: Add 'status_str' to parse_difftree_raw_line output"

This reverts commit 6aa6f92fda47cc4ee5f599895e8a5a327fb6f9ab. It caused is_deleted() subroutine to output warnings when dealing with old, legacy gitweb blobdiff URLs without either 'hb' or 'hpb' parameters. This fixes http://bugs.debian.org/469083 Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jakub Narebski committed Apr 5, 2008 at 21:13 UTC 4ed4a347168d6714c6beca7d7702473229c9d8f1
1 file changed +2 -3
gitweb/gitweb.perl
+2 -3
@@ -2164,7 +2164,7 @@ sub parse_difftree_raw_line {
2164 $res{'to_mode'} = $2;
2165 $res{'from_id'} = $3;
2166 $res{'to_id'} = $4;
2167 - $res{'status'} = $res{'status_str'} = $5;
2167 + $res{'status'} = $5;
2168 $res{'similarity'} = $6;
2169 if ($res{'status'} eq 'R' || $res{'status'} eq 'C') { # renamed or copied
2170 ($res{'from_file'}, $res{'to_file'}) = map { unquote($_) } split("\t", $7);
@@ -2180,7 +2180,6 @@ sub parse_difftree_raw_line {
2180 $res{'to_mode'} = pop @{$res{'from_mode'}};
2181 $res{'from_id'} = [ split(' ', $3) ];
2182 $res{'to_id'} = pop @{$res{'from_id'}};
2183 - $res{'status_str'} = $4;
2183 $res{'status'} = [ split('', $4) ];
2184 $res{'to_file'} = unquote($5);
2185 }
@@ -3002,7 +3001,7 @@ sub fill_from_file_info {
3001 sub is_deleted {
3002 my $diffinfo = shift;
3003
3005 - return $diffinfo->{'status_str'} =~ /D/;
3004 + return $diffinfo->{'to_id'} eq ('0' x 40);
3005 }
3006
3007 # does patch correspond to [previous] difftree raw line