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

Remote operations synchronization, and hooks

From
Eli Barzilay <eli@barzilay.org>
Date
Mar 2, 2010, 05:09 UTC
Message-ID
<m3r5o3ux5x.fsf@winooski.ccs.neu.edu>

Is there any kind of synchronization with remote operations? That is, can there be any race conditions if multiple clients connect? I'm assuming that such operations are safe, but I couldn't find a place with a concrete description.

More specifically, I'm wondering about writing hooks (specifically, a `post-receive' hook), and it would make things convenient if I knew that it was called synchronously.

And a related question: is there somewhere a summary of how the hooks are called for each operation? The githooks man page specifies some of the relationships but a list with how each operation perform its work would be much more convenient to read through. For example, if a remote update had a list of operations with "grab lock" in the beginning and a "release lock" after running the `post-receive' hook, then I wouldn't have the above question. Also, it's unclear how `post-update' is related to `post-receive' -- there's one comment in the man entry for the former that makes it sound like it is supersedes by the latter, but there's nothing explicit about it.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!
Next: Ilari Liusvaara
Message 1 of 2 in “Remote operations synchronization, and hooks”
  1. Eli BarzilayMar 2, 2010
  2. Ilari LiusvaaraMar 2, 2010

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.