Re: git should not use a default user.email config value
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 9, 2013, 23:06 UTC
- Message-ID
- <7v38qi4g7r.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20130809223758.GB7160@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 11 quoted lines
> Yeah, there are basically three levels of ident: > > 1. The user told us explicitly (e.g., $EMAIL, user.email). Trust it. > > 2. We guessed and it looks reasonable (e.g., hostname is FQDN). Warn > but use it. > > 3. It looks obviously bogus (e.g., we do not have a domain name). > Reject it. > > We can move some cases from (2) down to (3), like ...
Judging from Thorsten's earlier response, I am afraid no amount of autodetection would help the users of that site. If we were to do something, /etc/gitconfig as you outlined below would be the way to go, even though it makes me feel dirty.
Show 11 quoted lines
> Another option could to add an option to control the strictness. We > usually have a chicken-and-egg problem here with individual installs > (i.e., any person who could set "user.trustHostname = false" could just > as easily have set "user.email"). But in an institutional setting, the > admin could set such a config in /etc/gitconfig for everybody. Or for a > system like Debian, the packager could include the option, knowing that > any reasonably configured system should have /etc/mailname set up (which > is not something we can necessarily count on for other operating > systems). > > -Peff