git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Date
Sep 15, 2017, 01:50 UTC
Message-ID
<1505440235.1862.9.camel@gmail.com>
In-Reply-To
<CAC7pkbQwn8pvLLCtjsEkKo7PJozycdDbnq2XLWbmOm_KHEjU-w@mail.gmail.com>
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
Previous: Joseph DunneNext: Joseph Dunne
Message 4 of 7 in “commit-msg hook does not run on merge with --no-ff option”
  1. Joseph DunneSep 11, 2017
  2. Stefan BellerSep 11, 2017
  3. Joseph DunneSep 12, 2017
  4. Kaartic SivaraamSep 15, 2017
  5. Joseph DunneSep 15, 2017
  6. Junio C HamanoSep 15, 2017
  7. Joseph DunneSep 20, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.