Re: [PATCH 4/6] var: provide explicit/implicit ident information
From: Jeff King <hidden>
Date: 2016-06-15 22:55:17
On Wed, Nov 14, 2012 at 09:06:57AM -0800, Jonathan Nieder wrote:
Jeff King wrote:quoted
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 informationWhat 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