From: Ilari Liusvaara Date: Thu, 06 Jan 2011 17:28:48 GMT Subject: Re: Concurrent pushes updating the same ref Message-ID: <20110106172848.GA15729@LK-Perkele-VI.localdomain> In-Reply-To: On Thu, Jan 06, 2011 at 08:48:11AM -0800, Shawn Pearce wrote: > On Thu, Jan 6, 2011 at 08:30, Jeff King wrote: > > > >     Right now you are getting contention on the lock itself. But may > >     you not also run afoul of step (6) above? That is, one push updates > >     the ref from A to B, then the other one in attempting to go from A > >     to B sees that it has already changed to B under our feet and > >     complains? > > Not if its a force push. :-) IIRC, there are no wire protocol bits to denote a forced push, the force option only overrides client-side checks. Thus, even forced pushes can fail due to race conditions... -Ilari