gitweb: Show "no difference" message for empty diff
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>
This commit is contained in:
parent
55a9137d8a
commit
4280cde95f
@ -387,6 +387,10 @@ div.diff.incomplete {
|
|||||||
color: #cccccc;
|
color: #cccccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.diff.nodifferences {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #600000;
|
||||||
|
}
|
||||||
|
|
||||||
div.index_include {
|
div.index_include {
|
||||||
border: solid #d9d8d1;
|
border: solid #d9d8d1;
|
||||||
|
@ -2398,6 +2398,7 @@ sub git_patchset_body {
|
|||||||
my ($fd, $difftree, $hash, $hash_parent) = @_;
|
my ($fd, $difftree, $hash, $hash_parent) = @_;
|
||||||
|
|
||||||
my $patch_idx = 0;
|
my $patch_idx = 0;
|
||||||
|
my $patch_number = 0;
|
||||||
my $patch_line;
|
my $patch_line;
|
||||||
my $diffinfo;
|
my $diffinfo;
|
||||||
my (%from, %to);
|
my (%from, %to);
|
||||||
@ -2419,6 +2420,7 @@ sub git_patchset_body {
|
|||||||
# git diff header
|
# git diff header
|
||||||
#assert($patch_line =~ m/^diff /) if DEBUG;
|
#assert($patch_line =~ m/^diff /) if DEBUG;
|
||||||
#assert($patch_line !~ m!$/$!) if DEBUG; # is chomp-ed
|
#assert($patch_line !~ m!$/$!) if DEBUG; # is chomp-ed
|
||||||
|
$patch_number++;
|
||||||
push @diff_header, $patch_line;
|
push @diff_header, $patch_line;
|
||||||
|
|
||||||
# extended diff header
|
# extended diff header
|
||||||
@ -2581,6 +2583,7 @@ sub git_patchset_body {
|
|||||||
} continue {
|
} continue {
|
||||||
print "</div>\n"; # class="patch"
|
print "</div>\n"; # class="patch"
|
||||||
}
|
}
|
||||||
|
print "<div class=\"diff nodifferences\">No differences found</div>\n" if (!$patch_number);
|
||||||
|
|
||||||
print "</div>\n"; # class="patchset"
|
print "</div>\n"; # class="patchset"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user