From: Avery Pennarun <apenwarr@gmail.com>
To: Martin Langhoff <martin.langhoff@gmail.com>
Cc: "Edward Z. Yang" <ezyang@mit.edu>, git <git@vger.kernel.org>
Subject: Re: Interest in locking mechanism?
Date: Tue, 12 Jan 2010 15:25:18 -0500 [thread overview]
Message-ID: <32541b131001121225y3929d6cao437297f4f233f4e@mail.gmail.com> (raw)
In-Reply-To: <46a038f91001121133r62b3d748n38ca27234f18e960@mail.gmail.com>
On Tue, Jan 12, 2010 at 2:33 PM, Martin Langhoff
<martin.langhoff@gmail.com> wrote:
> On Tue, Jan 12, 2010 at 8:24 PM, Avery Pennarun <apenwarr@gmail.com> wrote:
>> really). Just make a 'co' command that writes your username to
>> .filename.lock and chmods the file; then write a ci command that
>> checks the lockfile to make sure it's yours, deletes the lock file,
>> git commits it, and chmods the file back again.
>
> Actually -- on the same track but even better: if you are using a
> unixy system, you are likely to have all the users belong to a group,
> and the files are editable by the group because they are rwx by group
> members.
>
> So write your own "git-lock" command that does "chmod g-w $@";
> git-unlock reenables the group-writable bit. Done.
The trick is to track which user has the file checked out; you don't
want some random person to (accidentally) check in someone else's
file. That's the whole point. Of course, you can arrange for this
with some simple shell scripting.
I doubt ACLs are needed really. RCS certainly works(1) fine without them.
Have fun,
Avery
(1) depending on your definition of "works"
next prev parent reply other threads:[~2010-01-12 20:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-12 18:10 Interest in locking mechanism? Edward Z. Yang
2010-01-12 18:29 ` B Smith-Mannschott
2010-01-12 18:33 ` Edward Z. Yang
2010-01-12 18:37 ` Tomas Carnecky
2010-01-12 19:01 ` Avery Pennarun
2010-01-12 19:11 ` Edward Z. Yang
2010-01-12 19:24 ` Avery Pennarun
2010-01-12 19:33 ` Martin Langhoff
2010-01-12 19:43 ` Edward Z. Yang
2010-01-12 20:25 ` Avery Pennarun [this message]
2010-01-12 19:26 ` Martin Langhoff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=32541b131001121225y3929d6cao437297f4f233f4e@mail.gmail.com \
--to=apenwarr@gmail.com \
--cc=ezyang@mit.edu \
--cc=git@vger.kernel.org \
--cc=martin.langhoff@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).