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

Re: git-config: replaces ~/.gitconfig symlink with real file

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Jul 17, 2007, 14:27 UTC
Message-ID
<vpqbqebt8ak.fsf@bauges.imag.fr>
In-Reply-To
<Pine.LNX.4.64.0707170834040.14781@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 9 quoted lines
> Hi,
>
> On Mon, 16 Jul 2007, Bradford Smith wrote:
>
>> So, I guess I need to add a GIT_CONFIG_HOME environment variable.  If I 
>> get that done, I'll send a patch to the list including doc updates.
>
> Alternatively, you could actually not ignore my hint at readlink(2) and 
> have a proper fix, instead of playing games with environment variables.
I second that.

Using an environment variable means having a configuration which is about git in my shell's config file, and that's a source of a lot of troubles. Murphy's law implies that one day, the environment variable won't be set properly (because you changed your shell, because you launch git from something which isn't a shell, because you logged-in in a way that didn't read the config file in which the variable was set, ...).

I can do with it, like many other software require an environment variable, but I find the symlink trick much more robust.

-- 
Matthieu
Previous: Johannes SchindelinNext: Fredrik Tolf
Message 17 of 21 in “git-config: replaces ~/.gitconfig symlink with real file”
  1. Bradford SmithJul 15, 2007
  2. Johannes SchindelinJul 15, 2007
  3. Nikolai WeibullJul 16, 2007
  4. Bradford SmithJul 16, 2007
  5. Bradford SmithJul 16, 2007
  6. Junio C HamanoJul 16, 2007
  7. 0/2 git-config should not replace symlinkBradford C. Smith, Jul 25, 2007
  8. 1/2 resolve symlinks when creating lockfilesBradford C. Smith, Jul 25, 2007
  9. 2/2 use lockfile.c routines in git_commit_set_multivar()Bradford C. Smith, Jul 25, 2007
  10. Junio C HamanoJul 25, 2007
  11. fully resolve symlinks when creating lockfilesBradford C. Smith, Jul 26, 2007
  12. Johannes SchindelinJul 26, 2007
  13. Morten WelinderJul 26, 2007
  14. Bradford SmithJul 27, 2007
  15. Junio C HamanoJul 27, 2007
  16. Johannes SchindelinJul 17, 2007
  17. Matthieu MoyJul 17, 2007
  18. Fredrik TolfJul 17, 2007
  19. Johannes SchindelinJul 17, 2007
  20. Catalin MarinasJul 17, 2007
  21. Johannes SchindelinJul 17, 2007

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.