Re: What is missing from Git v2.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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=<you@xxxxxxxxx>"), 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 <peff@xxxxxxxxxxxxxxxxxxxxx>
  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@xxxxxxxxxxx
  
  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@xxxxxxxxxxx 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@xxxxxxxxxxx"
    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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]