]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: Fix split patches output (e.g. file to symlink)
[Gitweb] / gitweb.perl
index 191be31419dbf0b8a3bf4ae6edaea6a72047932911e2fadc4df1896911cb9b0e..d03b97b1221ac25f1e52a4e5e1ce4451d4a8a5fd479b68bdfc95845876fdc250 100755 (executable)
@@ -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'}));
This page took 0.228055 seconds and 4 git commands to generate.