git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* The commit-msg hook is not invoked by git-merge as specified in documentation
@ 2020-06-03 12:46 Kalle Kromann
  2020-06-03 19:28 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Kalle Kromann @ 2020-06-03 12:46 UTC (permalink / raw)
  To: git@vger.kernel.org

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-04 15:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-03 12:46 The commit-msg hook is not invoked by git-merge as specified in documentation Kalle Kromann
2020-06-03 19:28 ` 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

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).