Re: [PATCH 4/6] var: provide explicit/implicit ident information
- From
Jeff King <peff@peff.net>
- Date
- Nov 14, 2012, 19:53 UTC
- Message-ID
- <20121114195357.GD3860@sigill.intra.peff.net>
- In-Reply-To
- <20121114170657.GC6858@elie.Belkin>
On Wed, Nov 14, 2012 at 09:06:57AM -0800, Jonathan Nieder wrote:
Show 16 quoted lines
> Jeff King wrote: > > > Internally, we keep track of whether the author or committer > > ident information was provided by the user, or whether it > > was implicitly determined by the system. However, there is > > currently no way for external programs or scripts to get > > this information > > What are the intended semantics? If my machine has /etc/mailname > filled out, is that an implicit identity? How about if I set the > EMAIL envvar but not GIT_COMMITTER_EMAIL? > > If external scripts are going to start using this mechanism, they will > need answers to these questions to support users that run into > configuration problems. A few words on this in the documentation > could probably help.
The intent is to make git's internal rules (whatever they may be) available to calling scripts. But I agree those rules should be spelled out now that they are becoming a more visible interface. I'll update the documentation.
> On most machines I have the EMAIL envvar set explicitly, but in the > recent past I relied on /etc/mailname on some others, so I'm also > genuinely curious about the use case here (and too lazy to dig it up).
Right now EMAIL is explicit, but `id`@`cat /etc/mailname` is not. I think changing that would be a separate issue, though (and I'm not sure whether it is a good idea; my /etc/mailname is not an email address I would want to use).
-Peff