From: Mike Hommey Date: Mon, 09 Feb 2009 06:59:19 GMT Subject: Re: gc considered dangerous Message-ID: <20090209065919.GB13257@glandium.org> In-Reply-To: <7vhc34y9za.fsf@gitster.siamese.dyndns.org> On Sun, Feb 08, 2009 at 12:00:57PM -0800, Junio C Hamano wrote: > Johannes Schindelin writes: > > > My preliminary guess is that this code in pack-write.c needs to use the > > lock file paradigm: > > > > if (!index_name) { > > [...] > > } else { > > unlink(index_name); > > fd = open(index_name, O_CREAT|O_EXCL|O_WRONLY, 0600); > > } > > Whoa. That particular code has been (and is still) correct. Don't both unlink and open fail in the case the index file is locked in Windows ? Mike