X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/61b8e5f83a6c26520b415e1a93584f4ba9610ab9dc78275c19186ea4b928755d..cf53823c54d38d5c92b9668166641e11c4fc7d88c1545c8c37e219258c852cd1:/gitweb.perl diff --git a/gitweb.perl b/gitweb.perl index f7b5315..968643c 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -2240,7 +2240,7 @@ sub git_difftree_body { } print $cgi->a({-href => href(action=>"blob", hash=>$diff{'to_id'}, hash_base=>$hash, file_name=>$diff{'file'})}, - "blob") . " | "; + "blob"); print "\n"; } elsif ($diff{'status'} eq "D") { # deleted @@ -2413,7 +2413,6 @@ sub git_patchset_body { push @diff_header, $patch_line; } - #last PATCH unless $patch_line; my $last_patch_line = $patch_line; # check if current patch belong to current raw line @@ -2523,10 +2522,13 @@ sub git_patchset_body { # from-file/to-file diff header $patch_line = $last_patch_line; - last PATCH unless $patch_line; + if (! $patch_line) { + print "\n"; # class="patch" + last PATCH; + } next PATCH if ($patch_line =~ m/^diff /); #assert($patch_line =~ m/^---/) if DEBUG; - if ($from{'href'}) { + if ($from{'href'} && $patch_line =~ m!^--- "?a/!) { $patch_line = '--- a/' . $cgi->a({-href=>$from{'href'}, -class=>"path"}, esc_path($from{'file'})); @@ -2534,11 +2536,10 @@ sub git_patchset_body { print "
$patch_line
\n"; $patch_line = <$fd>; - last PATCH unless $patch_line; chomp $patch_line; #assert($patch_line =~ m/^+++/) if DEBUG; - if ($to{'href'}) { + if ($to{'href'} && $patch_line =~ m!^\+\+\+ "?b/!) { $patch_line = '+++ b/' . $cgi->a({-href=>$to{'href'}, -class=>"path"}, esc_path($to{'file'}));