Re: [PATCH] git-merge: run commit hooks when making merge commits

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Wednesday, July 11, 2007 - 2:26 pm

Sam Vilain <sam.vilain@catalyst.net.nz> writes:


I suspect some people have pre-commit scripts that have been
meant to catch style errors for their own commits, and invoking
that on merge would wreak havoc --- there is not much you can do
if you want to get the work done by somebody else at that point.
Introducing a new pre-merge-commit hook would probably be safer;
if one wants to use the same check as one's pre-commit does, the
new hook in the repository can exec $GIT_DIR/hooks/pre-commit.

The commit-msg hook I have no clue what people usually use it
for in the real world, but a merge commit message tends to be
quite different from the message you would give to your own
straight line commits, so custom reformatting rules people have
in commit-msg hook may not apply to merge commit messages.

Same for post-commit, but probably to lessor extent, as I
suspect people use that mostly for per-commit notification
mechanism.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] git-merge: run commit hooks when making merge ..., Junio C Hamano, (Wed Jul 11, 2:26 pm)