summaryrefslogtreecommitdiff
path: root/githooks/update
diff options
context:
space:
mode:
Diffstat (limited to 'githooks/update')
-rw-r--r--githooks/update32
1 files changed, 0 insertions, 32 deletions
diff --git a/githooks/update b/githooks/update
deleted file mode 100644
index 47934c7..0000000
--- a/githooks/update
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-
-set -ue
-
-refname="$1"
-oldrev="$2"
-newrev="$3"
-
-if [ -z "${1+x}" ] || [ -z "${2+x}" ] || [ -z "${3+x}" ]; then
- echo "Usage: $0 REFNAME OLDREV NEWREF"
- exit 1
-fi
-
-
-[[ -z "$(git rev-list --max-count 1 "$oldrev".."$newrev" || echo "fail")" ]]
-is_ff=$?
-
-if $is_ff; then
- # always allow fast forwards
- exit 0
-fi
-
-if [[ "$refname" != refs/heads/master ]]; then
- # allow force-pushing if it's not master
- exit 0
-fi
-
-case $USER in
-*)
- exit 1
- ;;
-esac