]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: Show "no difference" message for empty diff
[Gitweb] / gitweb.perl
index 47dc9e13e55b6b03ee3c3e18df1747d14c25fbf44ee94e8cc22c16e5cd23a79a..b40fd35dc10b85f39687b1ae960d28da320f860fd1754ea5882de9303a621cfd 100755 (executable)
@@ -2399,6 +2399,7 @@ sub git_patchset_body {
        my ($fd, $difftree, $hash, $hash_parent) = @_;
 
        my $patch_idx = 0;
+       my $patch_number = 0;
        my $patch_line;
        my $diffinfo;
        my (%from, %to);
@@ -2420,6 +2421,7 @@ sub git_patchset_body {
                # git diff header
                #assert($patch_line =~ m/^diff /) if DEBUG;
                #assert($patch_line !~ m!$/$!) if DEBUG; # is chomp-ed
+               $patch_number++;
                push @diff_header, $patch_line;
 
                # extended diff header
@@ -2582,6 +2584,7 @@ sub git_patchset_body {
        } continue {
                print "</div>\n"; # class="patch"
        }
+       print "<div class=\"diff nodifferences\">No differences found</div>\n" if (!$patch_number);
 
        print "</div>\n"; # class="patchset"
 }
This page took 0.228363 seconds and 4 git commands to generate.