Hello, I need a way to lock a repository for certain actions. What can I use to obtain this? Is there a way to use rsync for that? It should also be NFS-safe. Are there are any classic unix tools that I can use for this?
Thomas
Hello, I need a way to lock a repository for certain actions. What can I use to obtain this? Is there a way to use rsync for that? It should also be NFS-safe. Are there are any classic unix tools that I can use for this?
Thomas
Re: Locking the repository
On Fri, 6 May 2005, Thomas Glanzmann wrote:
> > I need a way to lock a repository for certain actions.
Nope - if you want to serialize something, you'll need to write your own serialization scripts. git doesn't care, because all the git operations should be totally lockless already. There just isn't any reason to lock as far as git is concerned, since the objects are immutable.
The only exception is the "index" file, where we don't want concurrect index updates. So that is handled by writers creating the new "index.lock" file first, and then when they are done, they rename it to "index".
Linus