From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: merlyn@stonehenge.com (Randal L. Schwartz)
Cc: Sitaram Chamarty <sitaramc@gmail.com>, git@vger.kernel.org
Subject: Re: thoughts on a possible "pre-upload" hook
Date: Tue, 22 Sep 2009 18:05:33 +0200 [thread overview]
Message-ID: <vpqd45jvub6.fsf@bauges.imag.fr> (raw)
In-Reply-To: <867hvr2cms.fsf@blue.stonehenge.com> (Randal L. Schwartz's message of "Tue\, 22 Sep 2009 09\:00\:11 -0700")
merlyn@stonehenge.com (Randal L. Schwartz) writes:
>>>>>> "Sitaram" == Sitaram Chamarty <sitaramc@gmail.com> writes:
>
> Sitaram> Hello,
> Sitaram> As git is used more and more in corporate-type environments, at some
> Sitaram> point it becomes convenient to have *branches* (or more accurately,
> Sitaram> refs) that are not readable. The simplest way to do this (from git's
> Sitaram> point of view) is to allow a "pre-upload" hook, rather like the
> Sitaram> "pre-receive" hook or "update" hook.
>
> It would seem that you would need to do this even before the commit. So
> you're looking for the pre-commit hook. Otherwise, the commit is invalid,
> because it doesn't accurately represent everything it references. And the
> commit is the unit of transfer between repos.
I don't get the point. The OP's question is not about commiting, but
about preventing a branch from being fetched. So, right before sending
the commits in a branch, the server would execute a hook, and fail if
it's not allowed.
But that alone would make it rather painfull for the user : "git
clone" would fail if any branch in the repository is not readable, for
example.
Also, don't forget that branches are just references, which means that
if you prevent reference A from being uploaded, then another reference
B may point to the same commits as A, and then you can bypass the
safety hook on A by using B.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2009-09-22 16:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-22 10:20 thoughts on a possible "pre-upload" hook Sitaram Chamarty
2009-09-22 16:00 ` Randal L. Schwartz
2009-09-22 16:05 ` Matthieu Moy [this message]
2009-09-22 16:17 ` Shawn O. Pearce
2009-09-25 11:54 ` Sitaram Chamarty
2009-09-25 12:29 ` Matthieu Moy
2009-09-25 13:43 ` Sitaram Chamarty
2009-09-28 2:01 ` Adam Brewster
2009-09-28 3:02 ` Sitaram Chamarty
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=vpqd45jvub6.fsf@bauges.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=merlyn@stonehenge.com \
--cc=sitaramc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.