git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: feature request - implement a "GIT_AUTHOR_EMAIL" equivalent, but processed BEFORE .gitconfig

From
Nathan Neulinger <nneul@neulinger.org>
Date
May 30, 2014, 19:58 UTC
Message-ID
<5388E2F7.606@neulinger.org>
In-Reply-To
<xmqqvbsn82u6.fsf@gitster.dls.corp.google.com>
On 05/30/2014 02:48 PM, Junio C Hamano wrote:
Show 16 quoted lines
> Nathan Neulinger <nneul@neulinger.org> writes:
>
>>> I wouldn't mind having a GIT_EMAIL envvar with the semantics you mean,
>>> but can you say more about the use case?  What's wrong with the usual
>>> EMAIL environment variable?
>>
>> EMAIL actually worked for this case for me, but there wasn't any
>> equivalent for author name, so the commits all look like
>> "sharedaccount <myuser@mydomain>".
>
> I do not want to go into the discussion on the sanity/insanity of
> using such a "shared account", but I am guessing that you already
> have a concrete and workable mechanism in mind to allow you to set
> these environment variables such as GIT_WEAKER_AUTHOR_NAME to
> individual real users who share that account, and I further guess
> that that is what you use to set EMAIL.  Am I guessing right?
Yes, the behavior currently is:
	If I can figure out "who", I'll set the EMAIL/attributes based on that.
	If not, it'll default to the "don't know" behavior that throws up the list
Ideally, I'd prefer the second option be:
	Force user to specify --author if a good default can't be determined
But there doesn't appear to be a way to do that.
> If so, wouldn't it be a better option to use that mechanism to set
> separate $HOME (or XDG_CONFIG_HOME if you prefer) to these real
> users who share the account, so that separate $HOME/.gitconfig files
> can be used by them?

Not really, since there are lots of servers, and lots of application/service accounts. Where filesystem acl'ing can be used reasonably, it is, making this moot, but it still boils down to example case of "I have a team of X people maintaining Y different applications, each on their own dedicated account". I'd just like a good mechanism to set defaults based on information other than what is in the home dir on the occasions that users log in directly to the app account, as opposed to doing updates offline on their own systems/to central repo/etc.

-- Nathan

------------------------------------------------------------ Nathan Neulinger nneul@neulinger.org Neulinger Consulting (573) 612-1412

Previous: Junio C HamanoNext: Jeff King
Message 5 of 8 in “feature request - implement a "GIT_AUTHOR_EMAIL" equivalent, but processed BEFORE .gitconfig”
  1. Nathan NeulingerMay 30, 2014
  2. Jonathan NiederMay 30, 2014
  3. Nathan NeulingerMay 30, 2014
  4. Junio C HamanoMay 30, 2014
  5. Nathan NeulingerMay 30, 2014
  6. Jeff KingMay 30, 2014
  7. Junio C HamanoMay 30, 2014
  8. Jeff KingJun 2, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.