Re: git-config: replaces ~/.gitconfig symlink with real file
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 16, 2007, 22:46 UTC
- Message-ID
- <7vps2s2chy.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <f158199e0707160626j1025ab2cp3339ca6ab91d9af0@mail.gmail.com>
"Bradford Smith" <bradford.carl.smith@gmail.com> writes:
> ... So, I guess I need to add a GIT_CONFIG_HOME > environment variable.
I suspect that is going down a wrong path.
We use the sequence:
fd = creat("temporary location");
write(fd, ...);
close(fd);
rename("temporary location", "final location");in quite a lot of codepaths. I think they can be factored out, to take the "final location" (and perhaps a suggested temporary directory) as an parameter, and that code can check that "final location" is a symlink to somewhere else and create the temporary next to the target file.