Thread (30 messages) 30 messages, 9 authors, 2016-06-15

Re: What is missing from Git v2.0

From: Jeff King <hidden>
Date: 2016-06-15 23:00:49

On Thu, Apr 24, 2014 at 01:26:33PM -0500, Felipe Contreras wrote:
Jonathan Nieder wrote:
quoted
Stefan Beller wrote:
quoted
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=[off-list ref]"), 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 [off-list ref]
  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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help