summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e986e26)
raw | patch | inline | side by side (parent: e986e26)
author | Jakub Narebski <jnareb@gmail.com> | |
Thu, 17 May 2007 20:54:28 +0000 (22:54 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 18 May 2007 00:35:33 +0000 (17:35 -0700) |
Checking if $diffinfo->{'status'} is equal 'D' is no longer the way to
check if the file was deleted in result. For merge commits
$diffinfo->{'status'} is reference to array of statuses for each
parent. Use the fact that $diffinfo->{'to_id'} is all zeros as sign
that file was deleted in result.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
check if the file was deleted in result. For merge commits
$diffinfo->{'status'} is reference to array of statuses for each
parent. Use the fact that $diffinfo->{'to_id'} is all zeros as sign
that file was deleted in result.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 6f5df9174ec80d4decf4be8111f84e79411a156d..66f306705f083da30a4629dc16f3aad604d4db51 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
delete $from{'href'};
}
}
+
$to{'file'} = $diffinfo->{'to_file'} || $diffinfo->{'file'};
- if ($diffinfo->{'status'} ne "D") { # not deleted file
+ if ($diffinfo->{'to_id'} ne ('0' x 40)) { # file exists in result
$to{'href'} = href(action=>"blob", hash_base=>$hash,
hash=>$diffinfo->{'to_id'},
file_name=>$to{'file'});