1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-26 10:36:12 +02:00

gitweb: Empty patch for merge means trivial merge, not no differences

Earlier commit 4280cde95f made gitweb
show "No differences found" message for empty diff, for the HTML
output. But for merge commits, either -c format we use or --cc format,
empty diff doesn't mean no differences, but trivial merge.

Show "Trivial merge" message instead of "No differences found" for
merges.

While at it reword conditional in the code for easier reading.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Jakub Narebski 2007-05-17 00:05:55 +02:00 committed by Junio C Hamano
parent fdcb769916
commit d26c4264e5

View File

@ -2877,7 +2877,14 @@ sub git_patchset_body {
} continue {
print "</div>\n"; # class="patch"
}
print "<div class=\"diff nodifferences\">No differences found</div>\n" if (!$patch_number);
if ($patch_number == 0) {
if (@hash_parents > 1) {
print "<div class=\"diff nodifferences\">Trivial merge</div>\n";
} else {
print "<div class=\"diff nodifferences\">No differences found</div>\n";
}
}
print "</div>\n"; # class="patchset"
}