aboutsummaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2007-05-17 22:54:28 +0200
committerJunio C Hamano <junkio@cox.net>2007-05-17 17:35:33 -0700
commit5f85505265601823cc228fdc94d67d3b0ba582e4 (patch)
tree9d672a2d8fe4359fc5da7c921b7851e4e6b9d727 /gitweb
parente986e26a86616054f96373280e8f9cc89d7ea8ca (diff)
downloadgit-5f85505265601823cc228fdc94d67d3b0ba582e4.tar.gz
git-5f85505265601823cc228fdc94d67d3b0ba582e4.tar.xz
gitweb: Fix error in git_patchset_body for deletion in merge commit
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>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl3
1 files changed, 2 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 6f5df9174..66f306705 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2722,8 +2722,9 @@ sub git_patchset_body {
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'});