distgit: Block push of branches named 'origin/*'
We already use the update hook for gitolite. This introduces a new update hook, which merely chains the gitolite one, and a new one to block pushes to badly named branches. The new hook was written originally by Till Maas. https://fedorahosted.org/rel-eng/ticket/4071
This commit is contained in:
parent
57e3254f1a
commit
7ab3ff2817
4 changed files with 34 additions and 2 deletions
|
@ -108,9 +108,17 @@ git commit -q -m 'Initial setup of the repo' --author "$AUTHOR"
|
|||
git push -q origin master
|
||||
popd >/dev/null
|
||||
|
||||
# Put our special update hooks in place
|
||||
ln -s /usr/share/gitolite/hooks/common/update $GITROOT/$PACKAGE.git/hooks/
|
||||
# Setup our update hooks
|
||||
mkdir -p $GITROOT/$PACKAGE.git/hooks/update-chained.d
|
||||
ln -s /usr/share/gitolite/hooks/common/update \
|
||||
$GITROOT/$PACKAGE.git/hooks/update-chained.d/update-gitolite
|
||||
ln -s /usr/share/git-core/update-block-push-origin \
|
||||
$GITROOT/$PACKAGE.git/hooks/update-chained.d/update-block-push-origin
|
||||
|
||||
# This one kicks off all the others in update-chained.d
|
||||
ln -s /usr/share/git-core/update-chained $GITROOT/$PACKAGE.git/hooks/update
|
||||
|
||||
# Setup our post-receive hooks
|
||||
mkdir -p $GITROOT/$PACKAGE.git/hooks/post-receive-chained.d
|
||||
ln -s /usr/share/git-core/mail-hooks/gnome-post-receive-email \
|
||||
$GITROOT/$PACKAGE.git/hooks/post-receive-chained.d/post-receive-email
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue