• Michael J Gruber's avatar
    git-merge: honor pre-merge-commit hook · 6098817f
    Michael J Gruber authored
    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: default avatarMartin Ågren <martin.agren@gmail.com>
    Signed-off-by: default avatarMichael J Gruber <git@grubix.eu>
    Signed-off-by: default avatarMartin Ågren <martin.agren@gmail.com>
    Signed-off-by: default avatarJosh Steadmon <steadmon@google.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    6098817f
Name
Last commit
Last update
..
.gitignore Loading commit data...
Makefile Loading commit data...
branches-- Loading commit data...
hooks--applypatch-msg.sample Loading commit data...
hooks--commit-msg.sample Loading commit data...
hooks--fsmonitor-watchman.sample Loading commit data...
hooks--post-update.sample Loading commit data...
hooks--pre-applypatch.sample Loading commit data...
hooks--pre-commit.sample Loading commit data...
hooks--pre-merge-commit.sample Loading commit data...
hooks--pre-push.sample Loading commit data...
hooks--pre-rebase.sample Loading commit data...
hooks--pre-receive.sample Loading commit data...
hooks--prepare-commit-msg.sample Loading commit data...
hooks--update.sample Loading commit data...
info--exclude Loading commit data...
this--description Loading commit data...