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

Re: [PATCH] config: use GIT_CONFIG in git config sequence

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 26, 2020, 22:32 UTC
Message-ID
<xmqqsggp98to.fsf@gitster.c.googlers.com>
In-Reply-To
<xmqqwo627xsd.fsf@gitster.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 14 quoted lines
> Philip Oakley <philipoakley@iee.email> writes:
>
>> Mateusz's original problem was with discovery of these env variables,...
>
> I somehow doubt it.  
>
> Certainly, defeating /etc/gitconfig should be a part of the solution
> to the "I want a stable environment to run tests reproducibly,
> without getting affected by random settings the testing user may get
> affected" problem.  It is not enough to defeat $HOME/.gitconfig (and
> its xdg variant).
>
> But I didn't get the feeling that Mateusz was even aware of the need
> ...

After re-reading the patch that started this thread, I suspect the reason Mateusz did not mention GIT_CONFIG_NOSYSTEM could be because he was aware of the need to defeat /etc/gitconfig, and was already using it. There was no discovery issue---to somebody who would propose the patch under discussion to solve "I want a stable environment for testing", /etc/gitconfig was a solved problem.

And unfortunately we do not have GIT_CONFIG_NO_GLOBAL; so there is nothing to discover there, either X-<. If we were to add such an environment, we need to make sure that it is discoverable ;-)

I still think setting up a directory that can be used as a stable $HOME replacement and pointing at it during the test, while declining the system-wide one with GIT_CONFIG_NOSYSTEM, is the right approach for "stable test environment" problem.

Previous: Junio C HamanoNext: Mateusz Nowotynski
Message 13 of 14 in “config: use GIT_CONFIG in git config sequence”
  1. config: use GIT_CONFIG in git config sequenceMateusz Nowotyński, Apr 25, 2020
  2. Junio C HamanoApr 26, 2020
  3. Philip OakleyApr 26, 2020
  4. Mateusz NowotyńskiApr 26, 2020
  5. brian m. carlsonApr 26, 2020
  6. Mateusz NowotynskiApr 27, 2020
  7. Junio C HamanoApr 26, 2020
  8. Matt RogersApr 26, 2020
  9. Philip OakleyApr 26, 2020
  10. Matt RogersApr 26, 2020
  11. Philip OakleyApr 26, 2020
  12. Junio C HamanoApr 26, 2020
  13. Junio C HamanoApr 26, 2020
  14. Mateusz NowotynskiApr 27, 2020

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.