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: Simon <simonzack@gmail.com>, git@vger.kernel.org
Subject: Re: Git commit amend empty emails
Date: Wed, 10 Dec 2014 14:45:01 -0500	[thread overview]
Message-ID: <20141210194501.GA22969@peff.net> (raw)
In-Reply-To: <xmqqmw6vgx6v.fsf@gitster.dls.corp.google.com>

On Wed, Dec 10, 2014 at 10:46:16AM -0800, Junio C Hamano wrote:

> > So we now notice the empty email in this code path, but the only thing
> > we do is avoid writing out the environment variables and continue. Which
> > means that the actual string generated by fmt_ident (complete with empty
> > email) is what goes into the commit. So why are we setting the
> > environment variables at all?
> 
> I think that part was more underthinking than oversight.
> 
> We didn't want to abort the commit but we didn't want to contaminate
> the environment variables with known-to-be-bad values to spread the
> problem further.  But there is no guarantee that not exporting the
> environment variables would give us more comformant name and e-mail
> address, so that thinking is flawed.

That sort of makes sense, but I agree it is flawed. The real spread is
when the bogus data makes it into the commit objects themselves.

> > The first one fixes the regression and can stand by itself. The second
> > fixes the GIT_AUTHOR problem, but AFAIK that has been there for years.
> > So it is not as urgent, but is still maint-worthy, in my opinion.
> >
> >   [1/2]: commit: loosen ident checks when generating template
> >   [2/2]: commit: always populate GIT_AUTHOR_* variables

By the way, as I said I built these on the original regression. They
will have some minor textual conflicts if you merge them up to master,
due to the jk/commit-author-parsing topic. Please me know if you run
into any trouble merging.

-Peff

      reply	other threads:[~2014-12-10 19:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-10 13:17 Git commit amend empty emails Simon
2014-12-10 15:39 ` Jeff King
2014-12-10 15:42   ` [PATCH 1/2] commit: loosen ident checks when generating template Jeff King
2014-12-11 20:26     ` Eric Sunshine
2014-12-10 15:43   ` [PATCH 2/2] commit: always populate GIT_AUTHOR_* variables Jeff King
2014-12-10 18:46   ` Git commit amend empty emails Junio C Hamano
2014-12-10 19:45     ` Jeff King [this message]

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=20141210194501.GA22969@peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=simonzack@gmail.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).