From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: Re: Git commit amend empty emails Date: Wed, 10 Dec 2014 14:45:01 -0500 Message-ID: <20141210194501.GA22969@peff.net> References: <548847EF.7080805@gmail.com> <20141210153952.GA14910@peff.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Simon , git@vger.kernel.org To: Junio C Hamano X-From: git-owner@vger.kernel.org Wed Dec 10 20:45:12 2014 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XynCB-0000db-KM for gcvg-git-2@plane.gmane.org; Wed, 10 Dec 2014 20:45:11 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932612AbaLJTpF (ORCPT ); Wed, 10 Dec 2014 14:45:05 -0500 Received: from cloud.peff.net ([50.56.180.127]:51215 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755088AbaLJTpE (ORCPT ); Wed, 10 Dec 2014 14:45:04 -0500 Received: (qmail 23973 invoked by uid 102); 10 Dec 2014 19:45:03 -0000 Received: from Unknown (HELO peff.net) (10.0.1.1) by cloud.peff.net (qpsmtpd/0.84) with SMTP; Wed, 10 Dec 2014 13:45:03 -0600 Received: (qmail 12195 invoked by uid 107); 10 Dec 2014 19:45:08 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) by peff.net (qpsmtpd/0.84) with SMTP; Wed, 10 Dec 2014 14:45:08 -0500 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Wed, 10 Dec 2014 14:45:01 -0500 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: 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