X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/43a1d2911bc019edc2116adbe000e969af76e28a6ea703994b80dd7364f3520b..e86571b18e62ab5b67c3db72aaccd43572f9c34533f47772d33d0cfd18dd97b8:/gitweb.perl
diff --git a/gitweb.perl b/gitweb.perl
index 716d416..7d54919 100755
--- a/gitweb.perl
+++ b/gitweb.perl
@@ -2379,7 +2379,6 @@ sub git_patchset_body {
my $patch_line;
my $diffinfo;
my (%from, %to);
- my ($from_id, $to_id);
print "
\n";
@@ -2393,6 +2392,7 @@ sub git_patchset_body {
PATCH:
while ($patch_line) {
my @diff_header;
+ my ($from_id, $to_id);
# git diff header
#assert($patch_line =~ m/^diff /) if DEBUG;
@@ -2440,11 +2440,15 @@ sub git_patchset_body {
$from{'href'} = href(action=>"blob", hash_base=>$hash_parent,
hash=>$diffinfo->{'from_id'},
file_name=>$from{'file'});
+ } else {
+ delete $from{'href'};
}
if ($diffinfo->{'status'} ne "D") { # not deleted file
$to{'href'} = href(action=>"blob", hash_base=>$hash,
hash=>$diffinfo->{'to_id'},
file_name=>$to{'file'});
+ } else {
+ delete $to{'href'};
}
# this is first patch for raw difftree line with $patch_idx index
# we index @$difftree array from 0, but number patches from 1
@@ -2814,8 +2818,12 @@ sub git_tags_body {
print "
\n";
}
$alternate ^= 1;
- print "| $tag{'age'} | \n" .
- "" .
+ if (defined $tag{'age'}) {
+ print " | $tag{'age'} | \n";
+ } else {
+ print " | \n";
+ }
+ print "" .
$cgi->a({-href => href(action=>$tag{'reftype'}, hash=>$tag{'refid'}),
-class => "list name"}, esc_html($tag{'name'})) .
" | \n" .
@@ -3209,9 +3217,14 @@ HTML
esc_html($rev));
print "\n";
}
+ open (my $dd, "-|", git_cmd(), "rev-parse", "$full_rev^")
+ or die_error("could not open git-rev-parse");
+ my $parent_commit = <$dd>;
+ close $dd;
+ chomp($parent_commit);
my $blamed = href(action => 'blame',
file_name => $meta->{'filename'},
- hash_base => $full_rev);
+ hash_base => $parent_commit);
print "";
print $cgi->a({ -href => "$blamed#l$orig_lineno",
-id => "l$lineno",
|