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

Re: push race

From
ABAngelo Borsotti <angelo.borsotti@gmail.com>
Date
Oct 15, 2012, 11:50 UTC
Message-ID
<CAB9Jk9ABh45TQTu_KKxNGrVzSaT2_ed87M1jO-074ptP4F=w9A@mail.gmail.com>
In-Reply-To
<CAPc5daUon3eLTDT=3wo_=rTCJWVe=ufCvmSzrjD=0T17Dxkpqw@mail.gmail.com>
Hi Junio,

is receive-pack invoked only when using the git or ssh protocols, or is it invoked also when accessing directly a remote repository as a mounted filesystem? But let's see if there are problems also with the other protocols: in transport.c, the function git_transport_push calls first get_remote_heads() to get the tips of the branches and then calls send_pack(). I did not study deeply the code, but I have the impression that there is nothing that prevents an interleaved execution of them by two workstations. I had a look to receive-pack, and have seen that it creates lock files for the branches it updates. However the lock seems to protect only the updating of files, not the checking of the tips.

-Angelo
Previous: Angelo Borsotti
Message 20 of 20 in “push race”
  1. Angelo BorsottiOct 15, 2012
  2. Matthieu MoyOct 15, 2012
  3. Nguyen Thai Ngoc DuyOct 15, 2012
  4. Ævar Arnfjörð BjarmasonOct 15, 2012
  5. demerphqOct 15, 2012
  6. Marc BranchaudOct 15, 2012
  7. Angelo BorsottiOct 15, 2012
  8. Jeff KingOct 15, 2012
  9. Jeff KingOct 15, 2012
  10. Shawn PearceOct 16, 2012
  11. Jeff KingOct 16, 2012
  12. Nguyen Thai Ngoc DuyOct 16, 2012
  13. Jeff KingOct 16, 2012
  14. Nguyen Thai Ngoc DuyOct 16, 2012
  15. Jeff KingOct 16, 2012
  16. Junio C HamanoOct 16, 2012
  17. Jeff KingOct 16, 2012
  18. Junio C HamanoOct 16, 2012
  19. Angelo BorsottiOct 16, 2012
  20. Angelo BorsottiOct 15, 2012

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.