From: Martin Koegler Date: Sun, 25 Mar 2007 20:34:17 GMT Subject: [PATCH] gitweb: show no difference message Message-ID: <11748548622888-git-send-email-mkoegler@auto.tuwien.ac.at> Currently, gitweb shows only header and footer, if no differences are found. This patch adds a "No differences are found" message for the html output. Signed-off-by: Martin Koegler --- gitweb/gitweb.perl | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 5214050..fbadab4 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -2376,6 +2376,7 @@ sub git_patchset_body { my $patch_idx = 0; my $patch_line; + my $empty = 0; my $diffinfo; my (%from, %to); @@ -2396,6 +2397,7 @@ sub git_patchset_body { # git diff header #assert($patch_line =~ m/^diff /) if DEBUG; #assert($patch_line !~ m!$/$!) if DEBUG; # is chomp-ed + $empty++; push @diff_header, $patch_line; # extended diff header @@ -2559,6 +2561,8 @@ sub git_patchset_body { print "\n"; # class="patch" } + print "
No differences found
\n" if (!$empty); + print "\n"; # class="patchset" } -- 1.5.1.rc1.51.gb08b-dirty