git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Johannes Sixt <j6t@kdbg.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] commit: match explicit-ident semantics for summary and template
Date: Sun, 17 Jan 2010 16:00:38 -0500	[thread overview]
Message-ID: <20100117210038.GA3935@coredump.intra.peff.net> (raw)
In-Reply-To: <201001172153.44413.j6t@kdbg.org>

On Sun, Jan 17, 2010 at 09:53:44PM +0100, Johannes Sixt wrote:

> On Sonntag, 17. Januar 2010, Jeff King wrote:
> > -	if (!user_ident_explicitly_given) {
> > +	if (user_ident_explicitly_given != IDENT_ALL_GIVEN) {
> >  		strbuf_addstr(&format, "\n Committer: ");
> 
> Sorry for chiming in so late, but this new condition worries me a bit. On all 
> of my machines I have the GECOS field filled in with "Johannes Sixt", i.e., I 
> do not need user.name. But of course the automatically derived email address 
> is nonsense, so I've set up only user.email. Now I would always this hint, 
> wouldn't I? Do most others fill in GECOS in ways that are inappropriate for 
> git?

Yes, you are correctly analyzing the situation. I don't personally have
a preference (even though my GECOS field is correct, it always seemed
sensible to me to just explicitly set user.name along with user.email.
But presumably a user who has set one is clueful enough to know whether
they need to set the other one, too).

I do, however, think the summary behavior should match the behavior for
the commit message template, which was actually changed in 91c38a21.
Either this patch should be applied, or the other behavior should be
tweaked as below:

diff --git a/builtin-commit.c b/builtin-commit.c
index d4eef6d..ec1415e 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -656,7 +656,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
 				author_ident);
 		free(author_ident);
 
-		if (user_ident_explicitly_given != IDENT_ALL_GIVEN)
+		if (!user_ident_explicitly_given)
 			fprintf(fp,
 				"%s"
 				"# Committer: %s\n",

  reply	other threads:[~2010-01-17 21:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=20100117210038.GA3935@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    /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).