diff options
author | Jakub Narebski <jnareb@gmail.com> | 2007-05-17 00:05:55 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-05-16 16:13:42 -0700 |
commit | d26c4264e584a1a8cbadbc161fa52cf947f5230a (patch) | |
tree | 521a488a0d2e63f92ac11d2fe85f98ded1fd231d /gitweb | |
parent | fdcb769916c93b53517ef1b4cae447a3333c9b86 (diff) | |
download | git-d26c4264e584a1a8cbadbc161fa52cf947f5230a.tar.gz git-d26c4264e584a1a8cbadbc161fa52cf947f5230a.tar.xz |
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 <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-x | gitweb/gitweb.perl | 9 |
1 files changed, 8 insertions, 1 deletions
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 "</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" } |