diff options
Diffstat (limited to 'pre-receive')
| -rwxr-xr-x | pre-receive | 20 | 
1 files changed, 8 insertions, 12 deletions
| diff --git a/pre-receive b/pre-receive index 4232983..ec9c461 100755 --- a/pre-receive +++ b/pre-receive @@ -1,16 +1,12 @@  #!/bin/sh -eu  set -eu -user=`id -un` +BASE="/data/git/bin" -# Check if user is allowed -match=`test -f git-receive-allow && grep -Fx "$user" git-receive-allow || true` -echo $match > /tmp/match.log -if [ -z "$match" ]; then -	cat <<EOF >&2 ---- -You're not allowed to push to this repository as $user.  ---- -EOF -	exit 1 -fi +# Check receive policy +$BASE/check-receive-policy + +# Check commit policy for each one +while read oldrev newrev refname; do +	$BASE/check-rev-policy $oldrev $newrev $refname || exit 1 +done	 | 
