From: Jeff King Date: Thu, 24 Apr 2014 19:15:32 GMT Subject: Re: What is missing from Git v2.0 Message-ID: <20140424191531.GA7815@sigill.intra.peff.net> In-Reply-To: <53595759dce2a_3241f112ec9b@nysa.notmuch> On Thu, Apr 24, 2014 at 01:26:33PM -0500, Felipe Contreras wrote: > Jonathan Nieder wrote: > > Stefan Beller wrote: > > > > > I may have missunderstood. > > > > > > So today you cannot commit if you don't provide an email address > > > (usually the first time you try to commit, git asks to "git config > > > --global author.email="), if I remember correctly, so > > > there is definitely a valid (i.e. user approved) email address. > > > > Not true. But you do get a big wall of text when you make your > > first commit without an EMAIL envvar or configured [user] section, > > including > > Only if you don't have a fully qualified hostname. No, we alway warn if the values weren't explicitly provided: $ git config --global --unset user.email $ git commit --allow-empty -m foo [master 1e987ba] foo Committer: Jeff King Your name and email address were configured automatically based on your username and hostname. Please check that they are accurate. You can suppress this message by setting them explicitly: git config --global user.name "Your Name" git config --global user.email you@example.com After doing this, you may fix the identity used for this commit with: git commit --amend --reset-author but we will consider several sources explicit, like $GIT_COMMITTER_EMAIL, $EMAIL, and of course user.email: $ EMAIL=whatever@example.com git commit --allow-empty -m foo [master e75f17a] foo We die when the values are implicitly derived from the system _and_ they look bogus: $ sudo rm /etc/mailname $ sudo hostname bogus $ git commit --allow-empty -m foo *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: unable to auto-detect email address (got 'peff@bogus.(none)') -Peff