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

Re: Question about possible git races

From
Junio C Hamano <junkio@cox.net>
Date
Mar 23, 2006, 01:46 UTC
Message-ID
<7vmzfi53w7.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200603230222.38978.astralstorm@o2.pl>
Radoslaw Szkodzinski <astralstorm@o2.pl> writes:
> For me fetch = git-*-fetch. Which in turn calls git-receive-pack.
Does anything other than git-send-pack call git-receive-pack?

For fetch, git-fetch-pack is called from the core level, but it does not update refs itself. It writes out enough information to its standard output so that the script calling it can update the refs. So at the core level there cannot be any race, but that does not necessarily mean existing scripts are race free.

Our barebone Porcelainish scripts _do_ use update-ref to do the same lock - re-read - rename-to-update cycle when updating the refs using that information, but that is something you explicitly said you are not interested in ;-).

Previous: Radoslaw Szkodzinski
Message 10 of 10 in “Question about possible git races”
  1. Radoslaw SzkodzinskiMar 20, 2006
  2. Radoslaw SzkodzinskiMar 22, 2006
  3. Andreas EricssonMar 22, 2006
  4. Andreas EricssonMar 22, 2006
  5. Radoslaw SzkodzinskiMar 23, 2006
  6. Andreas EricssonMar 23, 2006
  7. Radoslaw SzkodzinskiMar 23, 2006
  8. Junio C HamanoMar 23, 2006
  9. Radoslaw SzkodzinskiMar 23, 2006
  10. Junio C HamanoMar 23, 2006

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.