summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 55a9137)
raw | patch | inline | side by side (parent: 55a9137)
author | Martin Koegler <mkoegler@auto.tuwien.ac.at> | |
Mon, 23 Apr 2007 05:49:25 +0000 (22:49 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 23 Apr 2007 05:49:25 +0000 (22:49 -0700) |
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>
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>
gitweb/gitweb.css | patch | blob | history | |
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css
index 5e402924040d55aff5fb831a737d108d1e68a0bb..2b023bd98a2def18f8a91c95b14fb5aadcbf9a0c 100644 (file)
--- a/gitweb/gitweb.css
+++ b/gitweb/gitweb.css
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 c48b35aa39fd13c14baac33b8df66b9c9bfc1735..cbd8d03e64baa6324192e0be8a910c508b196d05 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
my ($fd, $difftree, $hash, $hash_parent) = @_;
my $patch_idx = 0;
+ my $patch_number = 0;
my $patch_line;
my $diffinfo;
my (%from, %to);
# 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
} continue {
print "</div>\n"; # class="patch"
}
+ print "<div class=\"diff nodifferences\">No differences found</div>\n" if (!$patch_number);
print "</div>\n"; # class="patchset"
}