git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] commit: match explicit-ident semantics for summary and template

From
Jeff King <peff@peff.net>
Date
Jan 17, 2010, 19:34 UTC
Message-ID
<20100117193401.GA28448@coredump.intra.peff.net>

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
Next: Johannes Sixt
Message 1 of 6 in “commit: match explicit-ident semantics for summary and template”
  1. commit: match explicit-ident semantics for summary and templateJeff King, Jan 17, 2010
  2. Johannes SixtJan 17, 2010
  3. Jeff KingJan 17, 2010
  4. Junio C HamanoJan 17, 2010
  5. Jeff KingJan 18, 2010
  6. Junio C HamanoJan 18, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.