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

From: Kaartic Sivaraam <[email-masked]>
Date: Fri, 15 Sep 2017 07:20:35 +0530

On Tue, 2017-09-12 at 13:24 -0500, Joseph Dunne wrote:
> Sorry I don't understand your question.  The commit-msg hook runs
> properly in all cases except when I perform a merge with the --no-ff
> option enabled.
> 

It's working just as the documentation says it does (emphasis mine),

    This hook is invoked by **git commit**, and can be bypassed with the --no-verify option.
    It takes a single parameter, the name of the file that holds the proposed commit log
    message. Exiting with a non-zero status causes the git commit to abort.

    It says that 'commit-msg' hook is invoked only for a "commit" (it's not
    a MERGE-msg hook you see, it doesn't exist anyway). In case you see the
    hook getting invoked for a merge then that's an issue, I guess. For
    what kind of merges do you see the 'commit-msg' hook getting invoked? 

        -- 
        Kaartic