All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marios Titas <redneb@gmx.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2] ident: check for useConfigOnly before auto-detection of name/email
Date: Thu, 31 Mar 2016 18:01:09 +0300	[thread overview]
Message-ID: <20160331150109.GA7235@zeno> (raw)
In-Reply-To: <20160331144003.GE31116@sigill.intra.peff.net>

On Thu, Mar 31, 2016 at 10:40:03AM -0400, Jeff King wrote:
>On Wed, Mar 30, 2016 at 10:29:42PM +0300, Marios Titas wrote:
>
>> If user.useConfigOnly is set, it does not make sense to try to
>> auto-detect the name and/or the email. So it's better to do the
>> useConfigOnly checks first.
>
>It might be nice to explain how it is better here. I'd guess it is
>because we may fail during xgetpwuid(), giving a message that is much
>less informative?

Oops sorry, my bad, I should have included an example in the commit 
message. So with git 2.8.0, if you provide a name and set useConfigOnly 
to true in your ~/.gitconfig file, then if try to commit something in a 
new git repo, it will fail with the following message:

    *** 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 'XXX@YYY.(none)')

(provided of course that auto-detection of email fails). This wrong, 
because auto-detection is disabled anyway.

  reply	other threads:[~2016-03-31 15:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30 19:29 [PATCH 1/2] ident: check for useConfigOnly before auto-detection of name/email Marios Titas
2016-03-30 19:29 ` [PATCH 2/2] ident: make the useConfigOnly error messages more informative Marios Titas
2016-03-30 22:27   ` Junio C Hamano
2016-03-30 23:25     ` Marios Titas
2016-04-01 22:04       ` Junio C Hamano
2016-04-12 23:19         ` Junio C Hamano
2016-03-31 14:40 ` [PATCH 1/2] ident: check for useConfigOnly before auto-detection of name/email Jeff King
2016-03-31 15:01   ` Marios Titas [this message]
2016-03-31 16:31     ` Jeff King
2016-04-01 22:00     ` Junio C Hamano

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=20160331150109.GA7235@zeno \
    --to=redneb@gmx.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.