{"thread":{"id":"498","subject":"Locking the repository","startedAt":"2005-05-06T12:31:22Z","lastAt":"2005-05-06T16:15:41Z","messageCount":2,"participants":["Thomas Glanzmann","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"2661","messageId":"20050506123122.GF11506@cip.informatik.uni-erlangen.de","threadId":"498","inReplyTo":null,"subject":"Locking the repository","fromName":"Thomas Glanzmann","fromEmail":"sithglan@stud.uni-erlangen.de","sentAt":"2005-05-06T12:31:22Z","receivedAt":"2005-05-06T12:31:22Z","isPatch":false,"sender":{"key":"sithglan@stud.uni-erlangen.de","avatar":null},"body":"Hello,\nI need a way to lock a repository for certain actions. What can I use to\nobtain this? Is there a way to use rsync for that? It should also be\nNFS-safe. Are there are any classic unix tools that I can use for this?\n\n\tThomas\n"},{"id":"2672","messageId":"Pine.LNX.4.58.0505060913460.2233@ppc970.osdl.org","threadId":"498","inReplyTo":"20050506123122.GF11506@cip.informatik.uni-erlangen.de","subject":"Re: Locking the repository","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-05-06T16:15:41Z","receivedAt":"2005-05-06T16:15:41Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 6 May 2005, Thomas Glanzmann wrote:\n>\n> I need a way to lock a repository for certain actions.\n\nNope - if you want to serialize something, you'll need to write your own \nserialization scripts. git doesn't care, because all the git operations \nshould be totally lockless already. There just isn't any reason to lock as \nfar as git is concerned, since the objects are immutable.\n\nThe only exception is the \"index\" file, where we don't want concurrect \nindex updates. So that is handled by writers creating the new \"index.lock\" \nfile first, and then when they are done, they rename it to \"index\".\n\n\t\tLinus\n"}]}