git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Kalle Kromann <kalle.kromann@man-es.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: The commit-msg hook is not invoked by git-merge as specified in documentation
Date: Wed, 3 Jun 2020 12:46:27 +0000	[thread overview]
Message-ID: <AM0PR08MB55379DD182941E93F3BD3D37D7880@AM0PR08MB5537.eurprd08.prod.outlook.com> (raw)

Hello,

At least two places in the git docs it is specified that the hook "commit-msg" is invoked by both git-commit and git-merge.

https://git-scm.com/docs/githooks#_commit_msg
https://git-scm.com/docs/git-merge#Documentation/git-merge.txt---no-verify

I'm experiencing a different behavior however. The hook seems to work fine on git-commit, but is not invoked by git-merge.
When I use git-merge my text editor opens with the default message, but when I close the editor the hook is not invoked as I would expect.

For reference, the prepare-commit-msg hook works with both commands as expected.

Is there something subtle I'm overlooking?
Of course a fast forward merge should not invoke the commit-msg hook, because no commit is made.
But in my tests with non FF-merges the hook is still not invoked.

Kind regards,
Kalle Kromann
This is an e-mail from MAN Energy Solutions, branch of MAN Energy Solutions SE, Germany (CVR no. 31611792).
This e-mail (including any attachments) is confidential and may be privileged. If you have received this e-mail by mistake, please notify the sender by e-mail and delete it from your system.
Any unauthorized use or dissemination of this e-mail or its contents in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change.
MAN Energy Solutions SE (including its group companies) shall not be liable for improper or incomplete transmission of the information contained in this e-mail or for any delay in its receipt.
MAN Energy Solutions SE (or its group companies) does not guarantee that this e-mail has not been compromised or that it is free of viruses, interceptions or interference.

             reply	other threads:[~2020-06-03 12:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 12:46 Kalle Kromann [this message]
2020-06-03 19:28 ` The commit-msg hook is not invoked by git-merge as specified in documentation Junio C Hamano
2020-06-04  8:27   ` Kalle Kromann
2020-06-04 15:11     ` Junio C Hamano
2020-06-04 15:14       ` Kalle Kromann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM0PR08MB55379DD182941E93F3BD3D37D7880@AM0PR08MB5537.eurprd08.prod.outlook.com \
    --to=kalle.kromann@man-es.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).