summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorrl1987 <rl1987@sdf.lonestar.org>2018-11-20 16:37:30 +0200
committerrl1987 <rl1987@sdf.lonestar.org>2018-11-20 16:37:30 +0200
commitb2053cfc44f4876a52f8d71f2308077c6e39498d (patch)
tree4a76a7ce34808e47c9762d1e7734bb3852951875 /scripts
parentffee0a6384e751486bb4ca2752b6a00527b923ca (diff)
downloadtor-b2053cfc44f4876a52f8d71f2308077c6e39498d.tar.gz
tor-b2053cfc44f4876a52f8d71f2308077c6e39498d.zip
Also disallow fixup/squash commits in maint-* and release-*
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/maint/pre-push5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/maint/pre-push b/scripts/maint/pre-push
index 2cf1837b8d..26c48c4e21 100755
--- a/scripts/maint/pre-push
+++ b/scripts/maint/pre-push
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# git pre-push hook script to prevent "fixup!" and "squash!" commit
# from ending up in master, or in any branch if CUR_BRANCH check is removed.
@@ -10,7 +10,8 @@
z40=0000000000000000000000000000000000000000
CUR_BRANCH=$(git rev-parse --abbrev-ref HEAD)
-if [ "$CUR_BRANCH" != "master" ]
+if [ "$CUR_BRANCH" != "master" ] && [[ $CUR_BRANCH != release-* ]] &&
+ [[ $CUR_BRANCH != maint-* ]]
then
exit 0
fi