X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/e52d03579ab2103c9cf8e441356f0ab73d01944aee8b079cebdc8f3cdb8ecd9d..acbeae188b718094044fef191404c3ec4bf1fac28783a07b1ed8b9d4c0010753:/gitweb.perl diff --git a/gitweb.perl b/gitweb.perl index 718bfb5..486fec7 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -1706,8 +1706,30 @@ sub git_patchset_body { if ($in_header && $patch_line =~ m/^---/) { - #print "\n" + #print "\n"; # class="diff extended_header" $in_header = 0; + + my $file = $diffinfo->{'from_file'}; + $file ||= $diffinfo->{'file'}; + $file = $cgi->a({-href => href(action=>"blob", hash_base=>$hash_parent, + hash=>$diffinfo->{'from_id'}, file_name=>$file), + -class => "list"}, esc_html($file)); + $patch_line =~ s|a/.*$|a/$file|g; + print "
$patch_line
\n"; + + $patch_line = <$fd>; + chomp $patch_line; + + #$patch_line =~ m/^+++/; + $file = $diffinfo->{'to_file'}; + $file ||= $diffinfo->{'file'}; + $file = $cgi->a({-href => href(action=>"blob", hash_base=>$hash, + hash=>$diffinfo->{'to_id'}, file_name=>$file), + -class => "list"}, esc_html($file)); + $patch_line =~ s|b/.*|b/$file|g; + print "
$patch_line
\n"; + + next LINE; } next LINE if $in_header;