git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* No MERGE_HEAD available in pre-merge-commit hook
@ 2022-04-25 13:50 Wannes Sels
  0 siblings, 0 replies; only message in thread
From: Wannes Sels @ 2022-04-25 13:50 UTC (permalink / raw)
  To: git

The MERGE_HEAD ref is not available in the pre-merge-commit hook, but
it is available in subsequent hooks prepare-commit-msg and commit-msg

From https://github.com/git/git/blob/master/builtin/merge.c#L843 :
in prepare_to_commit() the call to write_merge_heads() is after
run_commit_hook("pre-merge-commit")

Can the write_merge_heads() call be moved up? At first glance it
doesn't look like it would break anything.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-25 13:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-25 13:50 No MERGE_HEAD available in pre-merge-commit hook Wannes Sels

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