From 0635832fe5614cd06a5a0fc6e683404712c27dcf Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 29 May 2019 18:47:42 +1200 Subject: Handle blank lines and comments in merge commits --- git/template/hooks/prepare-commit-msg.awk | 3 +++ 1 file changed, 3 insertions(+) (limited to 'git') 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 -- cgit v1.2.3