summaryrefslogtreecommitdiff
path: root/scripts/git
diff options
context:
space:
mode:
authorrl1987 <rl1987@sdf.lonestar.org>2019-07-02 20:06:23 +0300
committerrl1987 <rl1987@sdf.lonestar.org>2019-07-02 20:06:23 +0300
commit59e523f058ee0953deacf1370d546cabd192584d (patch)
treeced2273f56ea06ae23310a1126dfff6786978da6 /scripts/git
parent15e28af2d18b26b9ec4eda4bc2e84ed8465a166f (diff)
downloadtor-59e523f058ee0953deacf1370d546cabd192584d.tar.gz
tor-59e523f058ee0953deacf1370d546cabd192584d.zip
Early exit from post-merge git hook script when not merging to master
Diffstat (limited to 'scripts/git')
-rwxr-xr-xscripts/git/post-merge.git-hook6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/git/post-merge.git-hook b/scripts/git/post-merge.git-hook
index 176b7c9bbd..eae4f999e7 100755
--- a/scripts/git/post-merge.git-hook
+++ b/scripts/git/post-merge.git-hook
@@ -35,6 +35,12 @@ check_for_script_update() {
fi
}
+cur_branch=$(git rev-parse --abbrev-ref HEAD)
+if [ "$cur_branch" != "master" ]; then
+ echo "post-merge: Not a master branch. Skipping."
+ exit 0
+fi
+
check_for_diffs "pre-push"
check_for_diffs "pre-commit"
check_for_diffs "post-merge"