From: Jakub Narebski <jnareb@gmail•com>
To: git@vger•kernel.org
Cc: Jakub Narebski <jnareb@gmail•com>
Subject: [PATCH 7/6] gitweb: Empty patch for merge means trivial merge, not no differences
Date: Thu, 17 May 2007 00:05:55 +0200 [thread overview]
Message-ID: <11793531552023-git-send-email-jnareb@gmail.com> (raw)
In-Reply-To: <11784930091585-git-send-email-jnareb@gmail.com>
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>
---
gitweb/gitweb.perl | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 549e027..8c688be 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"
}
--
1.5.1.4
next prev parent reply other threads:[~2007-05-16 22:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-06 23:10 [PATCH 0/6] gitweb: Add combined diff support Jakub Narebski
2007-05-06 23:10 ` [PATCH 1/6] gitweb: Add parsing of raw combined diff format to parse_difftree_raw_line Jakub Narebski
2007-05-06 23:10 ` [PATCH 2/6] gitweb: Add combined diff support to git_difftree_body Jakub Narebski
2007-05-06 23:10 ` [PATCH 3/6] gitweb: Add combined diff support to git_patchset_body Jakub Narebski
2007-05-06 23:10 ` [PATCH 4/6] gitweb: Make it possible to use pre-parsed info in git_difftree_body Jakub Narebski
2007-05-06 23:10 ` [PATCH 5/6] gitweb: Show combined diff for merge commits in 'commitdiff' view Jakub Narebski
2007-05-06 23:10 ` [PATCH 6/6] gitweb: Show combined diff for merge commits in 'commit' view Jakub Narebski
2007-05-06 23:10 ` [PATCH 7/6] todo: Remove "Gitweb diff on merge commits" entry Jakub Narebski
2007-05-08 1:31 ` [PATCH 0/6] gitweb: Add combined diff support Junio C Hamano
2007-05-08 1:50 ` Jakub Narebski
2007-05-16 22:05 ` Jakub Narebski [this message]
2007-05-16 22:08 ` [PATCH 7/6] gitweb: Empty patch for merge means trivial merge, not no differences Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11793531552023-git-send-email-jnareb@gmail.com \
--to=jnareb@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox