Web lists-archives.com

commit-msg hook does not run on merge with --no-ff option




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.