Skip to content

pre-merge-hook

Michael J Gruber git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3git-merge: Honor pre-merge hookDocumentation/githooks.txt builtin/merge.c templates/hooks--pre-merge.sample+32 -18 replies
2/3merge: --no-verify to bypass pre-merge hookDocumentation/git-merge.txt Documentation/githooks.txt Documentation/merge-options.txt +1 more+9 -30 replies
3/3t7503: add tests for pre-merge-hookt/t7503-pre-commit-hook.sh+65 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] pre-merge-hook

The pre-commit hook is often used to ensure certain properties of each comitted tree like formatting or coding standards, validity (lint/make) or code quality (make test). But merges introduce new commits unless they are fast forwards, and therefore they can break these properties because the pre-commit hook is not run by "git merge".

Introduce a pre-merge hook which works for (non ff, automatic) merges like pre-commit does for commits. Typically this will just call the pre-commit hook (like in the sample hook), but it does not need to.

Michael J Gruber (3):
git-merge: Honor pre-merge hook
merge: --no-verify to bypass pre-merge hook
t7503: add tests for pre-merge-hook

 Documentation/git-merge.txt       |  2 +-
 Documentation/githooks.txt        |  7 +++++
 Documentation/merge-options.txt   |  4 +++
 builtin/merge.c                   | 15 ++++++++-
 t/t7503-pre-commit-hook.sh        | 66 ++++++++++++++++++++++++++++++++++++++-
 templates/hooks--pre-merge.sample | 13 ++++++++
 6 files changed, 104 insertions(+), 3 deletions(-)
 create mode 100755 templates/hooks--pre-merge.sample
Signature · 1 line
1.7.12.406.gafd3f81