9 if [ -z "$GIT_DIR" ]; then
10 echo "Don't run this script from the command line." >&2
11 echo " (if you want, you could supply GIT_DIR then run" >&2
12 echo " $0 <ref> <oldrev> <newrev>)" >&2
16 if [ -z "$ref" ] || [ -z "$oldrev" ] || [ -z "$newrev" ]; then
17 echo "Usage: $0 <ref> <oldrev> <newrev>" >&2
21 # --- Disallow pushing to the branches for pockets
26 git="$(invirt-getconf "git.pockets.$pocket.git" 2>/dev/null)"
33 for pocket in $(invirt-getconf -l build.pockets); do
34 if [ "$ref" = "refs/heads/$(pocket_to_git "$pocket")" ]; then
35 echo "*** Pushing to a pocket branch in this repository is not allowed" >&2
40 # --- Disallow pushing tags
46 echo "*** Pushing non-branches to this repository is not allowed" >&2