{"thread":{"id":"2457","subject":"lock","startedAt":"2005-11-11T16:31:31Z","lastAt":"2005-11-11T16:48:43Z","messageCount":4,"participants":["Paolo Teti","Johannes Schindelin","Petr Baudis"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"11605","messageId":"34a7ae040511110831y3e896738o@mail.gmail.com","threadId":"2457","inReplyTo":null,"subject":"lock","fromName":"Paolo Teti","fromEmail":"paolo.teti@gmail.com","sentAt":"2005-11-11T16:31:31Z","receivedAt":"2005-11-11T16:31:31Z","isPatch":false,"sender":{"key":"paolo.teti@gmail.com","avatar":null},"body":"Just a question probably stupid because I'm a quite new GIT user.\n\nIs possible to apply a lock (as in ClearCase) on a given file etc in order to\nprevent accidental check-out or any other tool operation?\n\nPao\n"},{"id":"11606","messageId":"Pine.LNX.4.63.0511111737590.17831@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"2457","inReplyTo":"34a7ae040511110831y3e896738o@mail.gmail.com","subject":"Re: lock","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-11-11T16:38:53Z","receivedAt":"2005-11-11T16:38:53Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 11 Nov 2005, Paolo Teti wrote:\n\n> Is possible to apply a lock (as in ClearCase) on a given file etc in \n> order to prevent accidental check-out or any other tool operation?\n\nYou should be able to do that with a hook (see Documentation/hooks.txt).\n\nHth,\nDscho\n"},{"id":"11607","messageId":"20051111164101.GV30496@pasky.or.cz","threadId":"2457","inReplyTo":"34a7ae040511110831y3e896738o@mail.gmail.com","subject":"Re: lock","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-11T16:41:01Z","receivedAt":"2005-11-11T16:41:01Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Fri, Nov 11, 2005 at 05:31:31PM CET, I got a letter\nwhere Paolo Teti <paolo.teti@gmail.com> said that...\n> Just a question probably stupid because I'm a quite new GIT user.\n> \n> Is possible to apply a lock (as in ClearCase) on a given file etc in order to\n> prevent accidental check-out or any other tool operation?\n\nCan you be a bit more detailed in the description of what do you exactly\nwant?\n\nDo you want to lock the file so that noone else will be able to check it\nout? That's impossible from GIT's very nature of distributed version\ncontrol system.\n\nDo you want to lock the file in your working copy so that you won't be\nable to remove it or change it? In that case, this is possible, but not\nimplemented yet. Part of the solution would involve making the file\nread-only, the rest would be probably to make sure all the tools handle\nthat case gracefully.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"},{"id":"11608","messageId":"34a7ae040511110848o624569cah@mail.gmail.com","threadId":"2457","inReplyTo":"20051111164101.GV30496@pasky.or.cz","subject":"Re: lock","fromName":"Paolo Teti","fromEmail":"paolo.teti@gmail.com","sentAt":"2005-11-11T16:48:43Z","receivedAt":"2005-11-11T16:48:43Z","isPatch":false,"sender":{"key":"paolo.teti@gmail.com","avatar":null},"body":"2005/11/11, Petr Baudis <pasky@suse.cz>:\n\n> Do you want to lock the file so that noone else will be able to check it\n> out? That's impossible from GIT's very nature of distributed version\n> control system.\n\nNo! I know that is impossible using GIT\n\n> Do you want to lock the file in your working copy so that you won't be\n> able to remove it or change it? In that case, this is possible, but not\n> implemented yet. Part of the solution would involve making the file\n> read-only, the rest would be probably to make sure all the tools handle\n> that case gracefully.\n\nYes! this is my case.. The as work-around I can use an hook (i.e. a\nkind of ClearCase trigger). But remain a work-around!\n"}]}