From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Stephen Hemminger <shemminger@vyatta.com>, git@vger.kernel.org
Subject: Re: Restricting access to a branch
Date: Wed, 21 May 2008 18:43:55 -0700 [thread overview]
Message-ID: <7v63t7xgdg.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LFD.1.10.0805211732520.3081@woody.linux-foundation.org> (Linus Torvalds's message of "Wed, 21 May 2008 17:37:20 -0700 (PDT)")
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.
next prev parent reply other threads:[~2008-05-22 1:45 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 [this message]
2008-05-22 8:16 ` Jakub Narebski
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=7v63t7xgdg.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--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).