This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository maintenancescripts. commit 1f82c2e1dea7a62d765d1e6e2de591c771be2d9a Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 23 23:31:21 2015 +0100 git/hooks/update-script._acl_: use update-script._check_ to not duplicate code. --- git/hooks/update-script._acl_ | 65 +---------------------------------------- 1 file changed, 1 insertion(+), 64 deletions(-) diff --git a/git/hooks/update-script._acl_ b/git/hooks/update-script._acl_ index 7beea26..3669e95 100755 --- a/git/hooks/update-script._acl_ +++ b/git/hooks/update-script._acl_ @@ -1,69 +1,6 @@ #!/bin/bash -umask 002 -x - -# If you are having trouble with this access control hook script -# you can try setting this to true. It will tell you exactly -# why a user is being allowed/denied access. - -verbose=true - -# Default shell globbing messes things up downstream -GLOBIGNORE=* - -function grant { - $verbose && echo >&2 "-Grant- $1" - echo grant - exit 0 -} - -function deny { - $verbose && echo >&2 "-Deny- $1" - echo deny - exit 1 -} - -function info { - $verbose && echo >&2 "-Info- $1" -} - -# Implement generic branch and tag policies. -# - Tags should not be updated once created. -# - Branches should only be fast-forwarded unless their pattern starts with '+' -case "$1" in - refs/tags/*) - git rev-parse --verify -q "$1" && - deny >/dev/null "You can't overwrite an existing tag" - ;; - refs/heads/*) - BRANCH="${1#refs/heads/}" - - # No rebasing or rewinding on release, build or master branches. - if expr "$2" : '0*$' >/dev/null; then - case "${BRANCH}" in - release/*|build-*|master|feature/*|bugfix/*) info "The branch '$1' is new..." ;; - *) deny >/dev/null "ERROR: Branch name does not meet the project policies. Please contact git-admin@x2go.org." ;; - esac - else - case "${BRANCH}" in - release/*|build-*|master) - # updating -- make sure it is a fast forward - mb=$(git-merge-base "$2" "$3") - case "$mb,$2" in - "$2,$mb") info "Update is fast-forward" ;; - *) noff=y; info "This is not a fast-forward update.";; - esac - ;; - feature/*|bugfix/*) info "Not checking for non-fast-forwards on ${BRANCH}." ;; - *) deny >/dev/null "ERROR: Branch name does not meet the project policies. Please contact git-admin@x2go.org." ;; - esac - fi - ;; - *) - deny >/dev/null \ - "Branch is not under refs/heads or refs/tags. What are you trying to do?" - ;; -esac +. hooks/update-script._check_ # Implement per-branch controls based on username allowed_users_file=$GIT_DIR/info/allowed-users -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git