From: Junio C Hamano Date: Mon, 16 Jul 2007 22:46:17 GMT Subject: Re: git-config: replaces ~/.gitconfig symlink with real file Message-ID: <7vps2s2chy.fsf@assigned-by-dhcp.cox.net> In-Reply-To: "Bradford Smith" 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.