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

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

From
Nathan Neulinger <nneul@neulinger.org>
Date
May 30, 2014, 18:19 UTC
Message-ID
<5388CBA5.9030403@neulinger.org>
Four related feature requests/ideas:
1. equivalent to GIT_*_EMAIL/NAME vars, but processed only if git config doesn't set values

Right now, there isn't any way to have a systemwide profile script that tries to determine a better default for the user name/email values, such as in the case of shared logins. The best I've been able to do for now is use the 'EMAIL' var.

Use case in my environment - most shared-login accounts are accessed via krb5 login, so it provides a nice way to set a better default for "who is doing this commit" than just the userid.

2. Setting option to user.name (or other setting) that would BLOCK the commit from occurring at all if it would 
otherwise fall back to defaults. I thought this previously worked by setting an empty value, but apparently doesn't work 
that way in current versions.
3. Setting option to user.name/user.email to prompt, SVN-style, for the name/email. Yes, this would be 
annoying/obnoxious to use normally, but intent is to avoid un-named "root@host" commits that would otherwise occur from 
user being lazy.
4. (This would accomplish all of the above) - enhance the include.path option to support the "!" syntax similar to what 
aliases can do. i.e.
[include]
    path = !/usr/local/bin/gen-git-env
or
[include]
    cmd = /usr/local/bin/gen-git-env
-- Nathan

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

Next: Jonathan Nieder
Message 1 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.