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

Is there an agreed protocol for git repo locking?

From
Jon Seymour <jon.seymour@gmail.com>
Date
May 10, 2009, 13:58 UTC
Message-ID
<2cfc40320905100658i4d7ef065qe01e35f2929dd2f6@mail.gmail.com>

As I understand it, the normal use case for git is one in which a single user performs a number of git operations in sequence on a private repo.

As such, locking issues don't normally arise - the user is only doing one thing at once.

I am working on an idea which will imply the need for concurrently executing processes to modify the repo, in particular refs. I specifically don't want to have a repo for each process precisely because I don't want to incur the costs of repo creation for every process and, in any case, I need them to share the refs.

In my use case, I may need locks that span several otherwise atomic operations - therefore relying on atomic locks that each git tool might employ for safety is not sufficient.

Is there an agreed upon locking protocol for the git repo? Is there tool support for this locking?

The case for adding it is that locking protocols only work if everyone agrees on the same protocol. The easiest way to do this would be to provide tools that enforce the desired locking protocol.

jon.
Next: Jakub Narebski
Message 1 of 2 in “Is there an agreed protocol for git repo locking?”
  1. Jon SeymourMay 10, 2009
  2. Jakub NarebskiMay 10, 2009

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.