From: Junio C Hamano Date: Wed, 05 Jan 2011 23:29:47 GMT Subject: Re: concurrent fetches to update same mirror Message-ID: <7vbp3vc4k4.fsf@alter.siamese.dyndns.org> In-Reply-To: <20110105211313.GB7808@sigill.intra.peff.net> Jeff King writes: > Interestingly, in the case of ref _creation_, not update, like this: > > mkdir repo && cd repo && git init > git remote add origin some-remote-repo-that-takes-a-few-seconds > xterm -e 'git fetch -v; read' & xterm -e 'git fetch -v; read' > > then both will happily update, the second one overwriting the results of > the first. It seems in the case of locking a ref which previously didn't > exist, we don't enforce that it still doesn't exist. We probably should, especially when there is no --force or +prefix is involved.