git/templates
Michael J Gruber 6098817fd7 git-merge: honor pre-merge-commit hook
git-merge does not honor the pre-commit hook when doing automatic merge
commits, and for compatibility reasons this is going to stay.

Introduce a pre-merge-commit hook which is called for an automatic merge
commit just like pre-commit is called for a non-automatic merge commit
(or any other commit).

[js: * renamed hook from "pre-merge" to "pre-merge-commit"
     * only discard the index if the hook is actually present
     * expanded githooks documentation entry
     * clarified that hook should write messages to stderr
     * squashed test changes from the original series' patch 4/4
     * modified tests to follow new pattern from this series' patch 1/4
     * added a test case for non-executable merge hooks
     * added a test case for failed merges
     * when testing that the merge hook did not run, make sure we
       actually have a merge to perform (by resetting the "side" branch
       to its original state).
     * reworded commit message
]

Improved-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Michael J Gruber <git@grubix.eu>
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-07 12:37:33 -07:00
..
.gitignore
branches--
hooks--applypatch-msg.sample *.sh: avoid hardcoding $GIT_DIR/hooks/... 2014-12-01 11:00:13 -08:00
hooks--commit-msg.sample
hooks--fsmonitor-watchman.sample fsmonitor: simplify determining the git worktree under Windows 2017-11-13 10:02:20 +09:00
hooks--post-update.sample
hooks--pre-applypatch.sample *.sh: avoid hardcoding $GIT_DIR/hooks/... 2014-12-01 11:00:13 -08:00
hooks--pre-commit.sample Update shell scripts to compute empty tree object ID 2018-05-02 13:59:53 +09:00
hooks--pre-merge-commit.sample git-merge: honor pre-merge-commit hook 2019-08-07 12:37:33 -07:00
hooks--pre-push.sample pre-push.sample: remove unnecessary and misleading IFS=' ' 2014-12-22 10:27:42 -08:00
hooks--pre-rebase.sample treewide: correct several "up-to-date" to "up to date" 2017-08-23 12:17:22 -07:00
hooks--pre-receive.sample pre-receive.sample: mark it executable 2016-10-28 14:21:11 -07:00
hooks--prepare-commit-msg.sample hook: use correct logical variable 2017-08-14 11:19:50 -07:00
hooks--update.sample templates/hooks: fix minor typo in the sample update-hook 2016-02-25 09:32:20 -08:00
info--exclude
Makefile
this--description