git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: John Keeping <john@keeping.me.uk>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: thomas@koch.ro, git@vger.kernel.org
Subject: Re: intend-to-edit flag
Date: Thu, 4 Jul 2013 19:19:11 +0100	[thread overview]
Message-ID: <20130704181911.GJ9161@serenity.lan> (raw)
In-Reply-To: <CACBZZX5tj0EpV7rv6FymSJunPY-Hs1fJrAmmAOnbEb9WKykmYg@mail.gmail.com>

On Thu, Jul 04, 2013 at 08:10:07PM +0200, Ævar Arnfjörð Bjarmason wrote:
> On Thu, Jul 4, 2013 at 7:56 PM, Thomas Koch <thomas@koch.ro> wrote:
> > we're evaluating Git to be used in our companies Tool. But a hard requirement
> > is the possibility to set an "intend-to-edit" flag on a file (better path).
> > Notice that I did not use the word "lock"! :-)
> >
> > One easy implementation might be a special branch "XYZ-locks" that contains an
> > empty blob for every flagged file. So our tool just needs to check, whether a
> > blob exists for the path that's intended to edit, tries to push a commit that
> > touches the file and only allows editing if the push succeeds.
> 
> In my experience everyone who thinks this is a hard requirement is
> wrong.

I completely agree with this.

Having said that, if you're looking at using Gitolite (which you should
if you're hosing your own repositories and not using some other hosting
solution), there is a "lock" command [1].  Note that this cannot stop
you committing changes to "locked" files locally but it does stop you
pushing changes to the central repository that touch locked files.

[1] http://gitolite.com/gitolite/locking.html

  reply	other threads:[~2013-07-04 18:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-04 17:56 intend-to-edit flag Thomas Koch
2013-07-04 18:10 ` Ævar Arnfjörð Bjarmason
2013-07-04 18:19   ` John Keeping [this message]
2013-07-04 18:25   ` Thomas Koch

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130704181911.GJ9161@serenity.lan \
    --to=john@keeping.me.uk \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=thomas@koch.ro \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).