From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Stephen Hemminger <shemminger@vyatta.com>,
git@vger.kernel.org
Subject: Re: Restricting access to a branch
Date: Thu, 22 May 2008 01:16:50 -0700 (PDT) [thread overview]
Message-ID: <m3d4ne4uts.fsf@localhost.localdomain> (raw)
In-Reply-To: <7v63t7xgdg.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Linus Torvalds <torvalds@linux-foundation.org> writes:
>
> > What you *can* do is:
> >
> > - rename the branch to something that includes a slash (aka
> > subdirectory). Let's call it "frozen/mybranch" as an example.
> >
> > - do a 'git gc' to make sure that branch is in the packed refs file.
> >
> > - make the subdirectory of that branch is unwritable (ie just do
> > something like "chmod -w refs/heads/frozen")
> >
> > and now the filesystem permissions should mean that you can't actually
> > update that branch any more, even though you can read it.
>
> Hmmmmm... and deleting of the branch would take the same lock used for
> updating, which is under frozen/ directory, so that is also safe.
>
> That's sneaky.
>
> I'd however throw that into "happens to work, unsure if we would want to
> promise supporting it as a _feature_ forever" category.
Another solution would be to make it lightweight tag, i.e. change if
from refs/heads/somebranch to refs/tags/somebranch (by tagging, for
example).
--
Jakub Narebski
Poland
ShadeHawk on #git
prev parent reply other threads:[~2008-05-22 8:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-21 23:36 Restricting access to a branch Stephen Hemminger
2008-05-22 0:17 ` Junio C Hamano
2008-05-22 0:37 ` Linus Torvalds
2008-05-22 1:43 ` Junio C Hamano
2008-05-22 8:16 ` Jakub Narebski [this message]
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=m3d4ne4uts.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=shemminger@vyatta.com \
--cc=torvalds@linux-foundation.org \
/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).