Re: Locking the repository
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- May 6, 2005, 16:15 UTC
- Message-ID
- <Pine.LNX.4.58.0505060913460.2233@ppc970.osdl.org>
- In-Reply-To
- <20050506123122.GF11506@cip.informatik.uni-erlangen.de>
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