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

Re: Concurrent fetch commands

From
Taylor Blau <me@ttaylorr.com>
Date
Jan 3, 2024, 16:40 UTC
Message-ID
<ZZWOBObBmLW9Nid6@nand.local>
In-Reply-To
<ZZU5s4LKQF1NLgnC@tanuki>
On Wed, Jan 03, 2024 at 11:40:51AM +0100, Patrick Steinhardt wrote:
Show 7 quoted lines
>   - `--append` should handle concurrency just fine, that is it knows to
>     append to a preexisting lockfile. This is messy though, and the
>     original creator of the lockfile wouldn't know when it can commit it
>     into place.
>
> Both options are kind of ugly, so I'm less sure now whether lockfiles
> are the way to go.

Interesting. Thinking a little bit about what you wrote here, I feel like `--append[=<FETCH_HEAD>] would do what you need here. The creator of the lockfile would commit it into place exactly when all children have finished writing into the existing lockfile.

It seems like that could work, but I haven't poked around to figure out whether or not that is the case. Regardless, supposing that it does work, I wonder what users reasonably expect in the presence of multiple 'git fetch' operations. I suppose the answer is that they expect concurrent fetches to be tolerated, but that the contents of FETCH_HEAD (and of course the remote references) are consistent at the end of all of the fetches.

Thanks, Taylor

Previous: Patrick SteinhardtNext: Junio C Hamano
Message 14 of 20 in “Concurrent fetch commands”
  1. Stefan HallerDec 31, 2023
  2. Dragan SimicDec 31, 2023
  3. Konstantin TokarevDec 31, 2023
  4. Dragan SimicDec 31, 2023
  5. Stefan HallerJan 1, 2024
  6. Federico KircheisJan 1, 2024
  7. Junio C HamanoDec 31, 2023
  8. Dragan SimicDec 31, 2023
  9. Stefan HallerJan 1, 2024
  10. Stefan HallerJan 1, 2024
  11. Patrick SteinhardtJan 3, 2024
  12. Patrick SteinhardtJan 3, 2024
  13. Patrick SteinhardtJan 3, 2024
  14. Taylor BlauJan 3, 2024
  15. Junio C HamanoJan 3, 2024
  16. Stefan HallerJan 4, 2024
  17. Mike HommeyJan 4, 2024
  18. Junio C HamanoJan 4, 2024
  19. Mike HommeyJan 4, 2024
  20. Taylor BlauJan 4, 2024

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.