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

Re: [PATCH] Introduce the GIT_CONFIG_EXTRA environment variable

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 19, 2009, 03:24 UTC
Message-ID
<7vhbrnodd9.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20091219013246.GD25474@genesis.frugalware.org>
Miklos Vajna <vmiklos@frugalware.org> writes:
Show 12 quoted lines
> This is like GIT_CONFIG but it is not read instead of .git/config, but
> in addtition to it.
>
> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
> ---
>
> On Fri, Dec 18, 2009 at 11:54:32PM +0100, Moe <moe@signalbeam.net> wrote:
>> $GIT_CONFIG doesn't work for this purpose because when set
>> git will *only* read the referenced file and ignore the
>> repository settings.
>
> What about this?

The patch text itself may be fine, in the sense that it makes "we read from three" to "we now read from four", but I am not impressed.

I find the original use case highly moronic.

For people to be sharing an account, hence $HOME, there must be a reason. They want to (rather, the administrator wants them to) use a common shared set of settings, so $HOME/.gitconfig should be shared among them, just like $HOME/.emacs and $HOME/.login are, unless there is some strong reason to treat .gitconfig any differently from all the other $HOME/.whatever files. But I don't think there wasn't any argument to defend that.

That makes the patch doubly suspect and throws it into "because we can", not "because we should".

Wouldn't it be just a matter of giving different HOME after they log-in?

After all, Moe will be giving _some_ way to his users set different value to GIT_CONFIG_EXTRA depending on who they really are, and that same mechanism should be usable to set different HOME to them, no?

As $HOME/.gitconfig is relative to the value of that environment variable, I don't see a reason for us to fall into this "three is not enough, but when we add another, we are fine" attitude, which makes me suspect that there is something fundamentally wrong there.

Previous: Miklos VajnaNext: Moe
Message 6 of 23 in “FEATURE REQUEST: Env override GIT_GLOBAL_CONFIG”
  1. MoeDec 18, 2009
  2. Introduce the GIT_CONFIG_EXTRA environment variableMiklos Vajna, Dec 19, 2009
  3. Shawn O. PearceDec 19, 2009
  4. MoeDec 19, 2009
  5. Miklos VajnaDec 19, 2009
  6. Junio C HamanoDec 19, 2009
  7. MoeDec 19, 2009
  8. Junio C HamanoDec 19, 2009
  9. MoeDec 19, 2009
  10. Johannes SchindelinDec 19, 2009
  11. MoeDec 19, 2009
  12. Nanako ShiraishiDec 19, 2009
  13. Introduce the GIT_HOME environment variableMiklos Vajna, Dec 19, 2009
  14. Michael J GruberDec 19, 2009
  15. Introduce the GIT_HOME environment variableMiklos Vajna, Dec 19, 2009
  16. Matthieu MoyDec 19, 2009
  17. Junio C HamanoDec 19, 2009
  18. Matthieu MoyDec 21, 2009
  19. Jeff KingDec 21, 2009
  20. Matthieu MoyDec 21, 2009
  21. Michael J GruberDec 21, 2009
  22. Junio C HamanoDec 19, 2009
  23. Introduce the GIT_HOME environment variableMiklos Vajna, Dec 20, 2009

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.