git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: [PATCH] commit: match explicit-ident semantics for summary and template
Date: Sun, 17 Jan 2010 14:34:01 -0500	[thread overview]
Message-ID: <20100117193401.GA28448@coredump.intra.peff.net> (raw)

Currently the commit summary will show the committer only if
neither the name or email was set explicitly. However, the
commit message template will show the committer unless
_both_ are set explicitly. This patch gives the same
behavior.

The difference came about because the two topics (one
enhancing the template semantics, and the other adding the
summary warning) were developed independently.

Signed-off-by: Jeff King <peff@peff.net>
---
This goes on top of 'next' as a result of merging jc/ident and
jk/warn-author-committer-after-commit. It's not correct on top of either
topic individually.

 builtin-commit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-commit.c b/builtin-commit.c
index 37c902c..d4eef6d 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -1099,7 +1099,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
 		strbuf_addstr(&format, "\n Author: ");
 		strbuf_addbuf_percentquote(&format, &author_ident);
 	}
-	if (!user_ident_explicitly_given) {
+	if (user_ident_explicitly_given != IDENT_ALL_GIVEN) {
 		strbuf_addstr(&format, "\n Committer: ");
 		strbuf_addbuf_percentquote(&format, &committer_ident);
 		if (advice_implicit_identity) {
-- 
1.6.6.418.gd5443

             reply	other threads:[~2010-01-17 19:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-17 19:34 Jeff King [this message]
2010-01-17 20:53 ` [PATCH] commit: match explicit-ident semantics for summary and template Johannes Sixt
2010-01-17 21:00   ` Jeff King
2010-01-17 22:03   ` Junio C Hamano
2010-01-18  1:47     ` Jeff King
2010-01-18  3:34       ` 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=20100117193401.GA28448@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).