diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-29 18:58:19 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-29 18:58:19 +1200 |
commit | 26987f8b62065d21242e2557251a9eeef3bd2b35 (patch) | |
tree | 05a14d2810dc5f53e739c15ea5acacc7b5a45009 /git | |
parent | Skip consecutive blanks in merge commits (diff) | |
download | dotfiles-26987f8b62065d21242e2557251a9eeef3bd2b35.tar.gz dotfiles-26987f8b62065d21242e2557251a9eeef3bd2b35.zip |
Skip blanks around ignored lines in merge commits
Diffstat (limited to 'git')
-rwxr-xr-x | git/template/hooks/prepare-commit-msg.awk | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/git/template/hooks/prepare-commit-msg.awk b/git/template/hooks/prepare-commit-msg.awk index 3be115b1..2fe43c5b 100755 --- a/git/template/hooks/prepare-commit-msg.awk +++ b/git/template/hooks/prepare-commit-msg.awk @@ -16,12 +16,12 @@ 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 +# This line is blank, or a comment; reset the branch +!NF || $1 ~ /^#/ { branch = 0 } + # Don't emit consecutive blanks NF { blank = 0 } !NF && blank++ { next } |