git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] commit: match explicit-ident semantics for summary and template
@ 2010-01-17 19:34 Jeff King
  2010-01-17 20:53 ` Johannes Sixt
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff King @ 2010-01-17 19:34 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-01-18  3:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-17 19:34 [PATCH] commit: match explicit-ident semantics for summary and template Jeff King
2010-01-17 20:53 ` 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

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).