www-infrastructure-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sitaram Chamarty <sitar...@gmail.com>
Subject Re: Full support for Git at Apache, a dangerously indigo plan.
Date Thu, 04 Nov 2010 05:55:09 GMT
On Thu, Nov 4, 2010 at 8:55 AM, Paul Querna <paul@querna.org> wrote:
> On Wed, Nov 3, 2010 at 9:30 PM, Sitaram Chamarty <sitaramc@gmail.com> wrote:

>>   - Authorisation is better done in "update" hook than
>>    "pre-receive".   Update gets called once for each ref
>>    being pushed, so you can accept some and reject others.
>>    Pre-receive is all or nothing -- one bad ref can reject
>>    all the refs being pushed, which could be confusing.   Or
>>    not...
> For us Group Authorization is actually mostly going to be on a
> whole-repository basis.   I don't think we intend to block individual
> commits based on the contents of the commits -- other than possibly
> issues with merge commits that haven't really been discussed in depth
> yet.

I probably didn't explain it properly.  Let's say you have a
"no force push" policy, and someone tried to push 2 branches
in the same push command, and one of the branches (foo) is a
fast-forward, while the other branch (bar) happens to be a
force-push.  Something like: `git push origin foo +bar`.

If you do your checking in post-receive, both branches will
be rejected.  If you do it in the update hook, the rejection
is selective -- only "bar" will be rejected.


View raw message