]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Also disallow fixup/squash commits in maint-* and release-*
authorrl1987 <rl1987@sdf.lonestar.org>
Tue, 20 Nov 2018 14:37:30 +0000 (16:37 +0200)
committerrl1987 <rl1987@sdf.lonestar.org>
Tue, 20 Nov 2018 14:37:30 +0000 (16:37 +0200)
scripts/maint/pre-push

index 2cf1837b8df76098f57c36428b4e36b1db03cf37..26c48c4e219cdc25b17294f43f9f6df669e8176a 100755 (executable)
@@ -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