summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorMartin Koegler <mkoegler@auto.tuwien.ac.at>2007-04-23 05:49:25 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-04-23 05:49:25 (GMT)
commit4280cde95fa4e3fb012eb6d0c239a7777baaf60c (patch)
treedd9a0f84a478c9d03a408997650e36168d084aa0 /gitweb
parent55a9137d8a33449425c55104c00bc9189381754a (diff)
downloadgit-4280cde95fa4e3fb012eb6d0c239a7777baaf60c.zip
git-4280cde95fa4e3fb012eb6d0c239a7777baaf60c.tar.gz
git-4280cde95fa4e3fb012eb6d0c239a7777baaf60c.tar.bz2
gitweb: Show "no difference" message for empty diffv1.5.2-rc0
Currently, gitweb shows only header and footer, if no differences are found. This patch adds a "No differences found" message for the html output. Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rw-r--r--gitweb/gitweb.css4
-rwxr-xr-xgitweb/gitweb.perl3
2 files changed, 7 insertions, 0 deletions
diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css
index 5e40292..2b023bd 100644
--- a/gitweb/gitweb.css
+++ b/gitweb/gitweb.css
@@ -387,6 +387,10 @@ div.diff.incomplete {
color: #cccccc;
}
+div.diff.nodifferences {
+ font-weight: bold;
+ color: #600000;
+}
div.index_include {
border: solid #d9d8d1;
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index c48b35a..cbd8d03 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2398,6 +2398,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);
@@ -2419,6 +2420,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
@@ -2581,6 +2583,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"
}