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

Re: concurrent fetches to update same mirror

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 5, 2011, 23:29 UTC
Message-ID
<7vbp3vc4k4.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20110105211313.GB7808@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
> 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.

Previous: Jeff KingNext: Jeff King
Message 9 of 12 in “concurrent fetches to update same mirror”
  1. Neal KreitzingerJan 5, 2011
  2. Jeff KingJan 5, 2011
  3. Shawn PearceJan 5, 2011
  4. Jeff KingJan 5, 2011
  5. Jeff KingJan 5, 2011
  6. Neal KreitzingerJan 5, 2011
  7. Neal KreitzingerJan 5, 2011
  8. Jeff KingJan 5, 2011
  9. Junio C HamanoJan 5, 2011
  10. Jeff KingJan 6, 2011
  11. Marc BranchaudJan 7, 2011
  12. Marc BranchaudJan 7, 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.