git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Concurrent pushes updating the same ref

From
ILIlari Liusvaara <ilari.liusvaara@elisanet.fi>
Date
Jan 6, 2011, 17:28 UTC
Message-ID
<20110106172848.GA15729@LK-Perkele-VI.localdomain>
In-Reply-To
<AANLkTinGYjExrnHCqcTPu-APzk9WynxwWoKVOLaSkZ2y@mail.gmail.com>
On Thu, Jan 06, 2011 at 08:48:11AM -0800, Shawn Pearce wrote:
Show 9 quoted lines
> On Thu, Jan 6, 2011 at 08:30, Jeff King <peff@peff.net> 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
Previous: Shawn PearceNext: Marc Branchaud
Message 4 of 8 in “Concurrent pushes updating the same ref”
  1. Marc BranchaudJan 6, 2011
  2. Jeff KingJan 6, 2011
  3. Shawn PearceJan 6, 2011
  4. Ilari LiusvaaraJan 6, 2011
  5. Marc BranchaudJan 6, 2011
  6. Marc BranchaudJan 10, 2011
  7. Junio C HamanoJan 6, 2011
  8. Marc BranchaudJan 6, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.