From: Junio C Hamano <gitster@pobox.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: Mario Pareja <mpareja.dev@gmail.com>,
Andreas Ericsson <ae@op5.se>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Locking binary files
Date: Tue, 23 Sep 2008 12:49:24 -0700 [thread overview]
Message-ID: <7v7i92tzgb.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LNX.1.00.0809231216350.19665@iabervon.org> (Daniel Barkalow's message of "Tue, 23 Sep 2008 13:32:15 -0400 (EDT)")
Daniel Barkalow <barkalow@iabervon.org> writes:
> I think the right tool on the git side is actually a "smudge/clean"
> script. When you check something out, git converts it from the
> repository-stored form to a working tree form using a script (if there is
> one configured); this could check whether you've got the appropriate lock,
> and make the file unwritable if you don't.
An obvious question is "how would such a script check the lock when you
are 30,000 ft above ground"; in other words, this "locking mechanism"
contradicts the very nature of distributed development theme. The best
mechanism should always be on the human side. An SCM auguments
inter-developer communication, but it is not a _substitute_ for
communication.
But if you limit the use case to an always tightly connected environment
(aka "not distributed at all"), I agree the above would be a very
reasonable approach.
Such a setup would need a separate locking infrastructure and an end user
command that grabs the lock and when successful makes the file in the work
tree read/write. The user butchers the contents after taking the lock,
saves, and then when running "git commit", probably the post-commit hook
would release any relevant locks.
All these can be left outside the scope of git, as they can be hooked into
git with the existing infrastructure. Once a BCP materializes it could be
added to contrib/ just like the "paranoid" update hook.
next prev parent reply other threads:[~2008-09-23 19:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <94c1db200809222333q4953a6b9g8ce0c1cd4b8f5eb4@mail.gmail.com>
2008-09-23 6:39 ` Locking binary files Mario Pareja
2008-09-23 7:18 ` Andreas Ericsson
[not found] ` <94c1db200809230054t20e7e61dh5022966d4112eee6@mail.gmail.com>
2008-09-23 8:31 ` Andreas Ericsson
2008-09-23 13:56 ` Mario Pareja
2008-09-23 14:28 ` Alex Riesen
2008-09-23 17:32 ` Daniel Barkalow
2008-09-23 19:49 ` Junio C Hamano [this message]
2008-09-23 21:13 ` Daniel Barkalow
2008-09-23 21:54 ` Dmitry Potapov
2008-09-23 22:29 ` Daniel Barkalow
2008-09-23 23:21 ` Dmitry Potapov
2008-09-24 4:15 ` Daniel Barkalow
2008-09-24 15:00 ` Dmitry Potapov
2008-09-23 20:46 ` Dmitry Potapov
2008-09-23 11:16 ` Boaz Harrosh
2008-09-23 11:20 ` Boaz Harrosh
2008-09-23 14:14 ` Mario Pareja
2008-09-23 14:35 ` Boaz Harrosh
2008-09-23 13:44 ` Dmitry Potapov
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=7v7i92tzgb.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=ae@op5.se \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=mpareja.dev@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).