[PATCH] gitweb: show no difference message
- From
- Martin Koegler <mkoegler@auto.tuwien.ac.at>
- Date
- Mar 25, 2007, 20:34 UTC
- 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 <mkoegler@auto.tuwien.ac.at> --- 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 "</div>\n"; # class="patch" } + print "<div class=\"diff header\">No differences found</div>\n" if (!$empty); + print "</div>\n"; # class="patchset" }
-- 1.5.1.rc1.51.gb08b-dirty