From: Brandon Casey Date: Thu, 17 Jan 2008 17:17:15 GMT Subject: Re: What's in git.git (stable frozen) Message-ID: <478F8D9B.5080703@nrlssc.navy.mil> In-Reply-To: <7vk5m9kvf7.fsf@gitster.siamese.dyndns.org> In lockfile.c:commit_locked_index() You didn't include the portion of your patch that assigned NULL to alternate_index_output before attempting to close and rename. Should that be included? -brandon Junio C Hamano wrote: @@ -185,9 +198,15 @@ void set_alternate_index_output(const char *name) int commit_locked_index(struct lock_file *lk) { if (alternate_index_output) { - int result = rename(lk->filename, alternate_index_output); - lk->filename[0] = 0; - return result; + const char *newname = alternate_index_output; + alternate_index_output = NULL;