X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/739df17f552f684fab90d96e66c4ef9470bc2c156b5113fc2f018b4051a473ff..a500281b1341f6d889e340f955c74d6e5a32d98773cd33fc539a57540b920df2:/gitweb.perl diff --git a/gitweb.perl b/gitweb.perl index 191be31..d03b97b 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -2526,7 +2526,7 @@ sub git_patchset_body { last PATCH unless $patch_line; 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'})); @@ -2538,7 +2538,7 @@ sub git_patchset_body { 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'}));