diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-29 18:47:42 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-29 18:48:40 +1200 |
commit | 0635832fe5614cd06a5a0fc6e683404712c27dcf (patch) | |
tree | ca9c940cbdb736e4375df0dcccfe6d419695b08a /git | |
parent | Adjust prepare-commit-msg hook to arguments (diff) | |
download | dotfiles-0635832fe5614cd06a5a0fc6e683404712c27dcf.tar.gz dotfiles-0635832fe5614cd06a5a0fc6e683404712c27dcf.zip |
Handle blank lines and comments in merge commits
Diffstat (limited to 'git')
-rwxr-xr-x | git/template/hooks/prepare-commit-msg.awk | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/git/template/hooks/prepare-commit-msg.awk b/git/template/hooks/prepare-commit-msg.awk index 800e2220..2ee8d3a9 100755 --- a/git/template/hooks/prepare-commit-msg.awk +++ b/git/template/hooks/prepare-commit-msg.awk @@ -15,6 +15,9 @@ BEGIN { next } +# This line is blank, or a comment; reset the branch +!NF || $1 ~ /^\#/ { branch = 0 } + # Commit message subject patterns to skip go here; be as precise as you can $0 == " Bump VERSION" { next } # Skip version number bumps |