From: Jakub Narebski Date: Wed, 16 May 2007 22:05:55 +0000 (+0200) Subject: gitweb: Empty patch for merge means trivial merge, not no differences X-Git-Tag: v1.5.2~19 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d26c4264e584a1a8cbadbc161fa52cf947f5230a;p=git.git gitweb: Empty patch for merge means trivial merge, not no differences Earlier commit 4280cde95fa4e3fb012eb6d0c239a7777baaf60c 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 Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 549e0270b..8c688be66 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -2877,7 +2877,14 @@ sub git_patchset_body { } continue { print "\n"; # class="patch" } - print "
No differences found
\n" if (!$patch_number); + + if ($patch_number == 0) { + if (@hash_parents > 1) { + print "
Trivial merge
\n"; + } else { + print "
No differences found
\n"; + } + } print "\n"; # class="patchset" }