Early exit from post-merge git hook script when not merging to master

This commit is contained in:
rl1987
2019-07-02 20:06:23 +03:00
parent 15e28af2d1
commit 59e523f058
2 changed files with 9 additions and 0 deletions
+6
View File
@@ -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"