ansible/roles/git/hooks/files/update-chained
Mathieu Bridon 7ab3ff2817 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
2014-10-27 10:48:12 +01:00

12 lines
266 B
Bash

#!/bin/bash
refname="${1}"
sha1_old="${2}"
sha1_new="${3}"
$GIT_DIR/hooks/update-chained.d/update-gitolite "$refname" "$sha1_old" "$sha1_new" || exit 1
$GIT_DIR/hooks/update-chained.d/update-block-push-origin "$refname" "$sha1_old" "$sha1_new" || exit 1
exit 0