diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-10 17:28:13 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-10 17:28:13 +1200 |
commit | b777cd20189ff9d7653ca7672039d5d9f848b81e (patch) | |
tree | a765f79c33083edae996bc3e5ba60ca9aaed08ff /git/template | |
parent | Merge branch 'release/v5.34.0' (diff) | |
download | dotfiles-b777cd20189ff9d7653ca7672039d5d9f848b81e.tar.gz dotfiles-b777cd20189ff9d7653ca7672039d5d9f848b81e.zip |
Allow merge commits to master
Diffstat (limited to 'git/template')
-rw-r--r-- | git/template/hooks/pre-commit.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/git/template/hooks/pre-commit.sh b/git/template/hooks/pre-commit.sh index 22e876ad..f0e093b3 100644 --- a/git/template/hooks/pre-commit.sh +++ b/git/template/hooks/pre-commit.sh @@ -7,6 +7,9 @@ # Allow commit if there's no develop branch git show-ref --quiet --verify refs/heads/develop || exit 0 +# Allow commit if it's a merge. Is there a better way to test this? +! git rev-parse --quiet --verify MERGE_HEAD >/dev/null || exit 0 + # Throw toys printf >&2 'Branch develop exists, commits to master blocked\n' exit 1 |