summaryrefslogtreecommitdiff
path: root/hook.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-03-07 12:33:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-03-07 21:00:52 (GMT)
commit9f6e63b966e9876ca6f990819fabafc473a3c9b0 (patch)
tree7002512a4521cac565fa7919ae48e9be19ffd8b5 /hook.c
parentc2162907e9aa884bdb70208389cb99b181620d51 (diff)
downloadgit-9f6e63b966e9876ca6f990819fabafc473a3c9b0.zip
git-9f6e63b966e9876ca6f990819fabafc473a3c9b0.tar.gz
git-9f6e63b966e9876ca6f990819fabafc473a3c9b0.tar.bz2
merge: don't run post-hook logic on --no-verify
Fix a minor bug introduced in bc40ce4de61 (merge: --no-verify to bypass pre-merge-commit hook, 2019-08-07), when that change made the --no-verify option bypass the "pre-merge-commit" hook it didn't update the corresponding find_hook() (later hook_exists()) condition. As can be seen in the preceding commit in 6098817fd7f (git-merge: honor pre-merge-commit hook, 2019-08-07) the two should go hand in hand. There's no point in invoking discard_cache() here if the hook couldn't have possibly updated the index. It's buggy that we use "hook_exist()" here, and as discussed in the subsequent commit it's subject to obscure race conditions that we're about to fix, but for now this change is a strict improvement that retains any caveats to do with the use of "hooks_exist()" as-is. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'hook.c')
0 files changed, 0 insertions, 0 deletions