Skip to content

Commit 4ed4a34

Browse files
jnarebgitster
authored andcommitted
Revert "gitweb: Add 'status_str' to parse_difftree_raw_line output"
This reverts commit 6aa6f92. 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>
1 parent 77ad7a4 commit 4ed4a34

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

gitweb/gitweb.perl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2164,7 +2164,7 @@ sub parse_difftree_raw_line {
21642164
$res{'to_mode'} = $2;
21652165
$res{'from_id'} = $3;
21662166
$res{'to_id'} = $4;
2167-
$res{'status'} = $res{'status_str'} = $5;
2167+
$res{'status'} = $5;
21682168
$res{'similarity'} = $6;
21692169
if ($res{'status'} eq 'R' || $res{'status'} eq 'C') { # renamed or copied
21702170
($res{'from_file'}, $res{'to_file'}) = map { unquote($_) } split("\t", $7);
@@ -2180,7 +2180,6 @@ sub parse_difftree_raw_line {
21802180
$res{'to_mode'} = pop @{$res{'from_mode'}};
21812181
$res{'from_id'} = [ split(' ', $3) ];
21822182
$res{'to_id'} = pop @{$res{'from_id'}};
2183-
$res{'status_str'} = $4;
21842183
$res{'status'} = [ split('', $4) ];
21852184
$res{'to_file'} = unquote($5);
21862185
}
@@ -3002,7 +3001,7 @@ sub fill_from_file_info {
30023001
sub is_deleted {
30033002
my $diffinfo = shift;
30043003

3005-
return $diffinfo->{'status_str'} =~ /D/;
3004+
return $diffinfo->{'to_id'} eq ('0' x 40);
30063005
}
30073006

30083007
# does patch correspond to [previous] difftree raw line

0 commit comments

Comments
 (0)