commit-msg hook does not run on merge with --no-ff option
- From
- Joseph Dunne <jdunne525@gmail.com>
- Date
- Sep 11, 2017, 14:34 UTC
- Message-ID
- <CAC7pkbQhwLFQQjqBwaW=0j4iKFcLdKDucCMck-PsSAeCs0rqpw@mail.gmail.com>
I’ve globally configured git master branch to use the –no-ff option in
my .gitconfig file:
[branch "master"]
mergeoptions = “-–no-ff”When I merge a branch into master that would normally be a fast forward merge, the merge happens fine and follows the option –no-ff, creating a new commit, however my commit-msg hook does not run. (The commit-msg hook works fine in all other commits / merges.)
I tried changing my commit-msg hook to just be “exit 1” and it doesn’t abort a no-ff merge, so I’m certain the hook is just not being executed.