]> git.ipfire.org Git - thirdparty/git.git/commit
tests: extend "test_hook" for "rm" and "chmod -x", convert "$HOOK"
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 17 Mar 2022 10:13:16 +0000 (11:13 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 Mar 2022 21:42:14 +0000 (14:42 -0700)
commit66865d12a0a15276fd525a461e0873bf82d4f246
treeeb67caff7a3c52a90028da006282c0fc660b3b84
parentc36c62859ae59e5ff3cd2a620ab8c906793dc615
tests: extend "test_hook" for "rm" and "chmod -x", convert "$HOOK"

Extend the "test_hook" function to take options to disable and remove
hooks. Using the wrapper instead of getting the path and running
"chmod -x" or "rm" will make it easier to eventually emulate the same
behavior with config-based hooks.

Not all of these tests need that new mode, but since the rest are
either closely related or use the same "$HOOK" pattern let's convert
them too.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t2400-worktree-add.sh
t/t5543-atomic-push.sh
t/t5571-pre-push-hook.sh
t/t7503-pre-commit-and-pre-merge-commit-hooks.sh
t/t7504-commit-msg-hook.sh
t/t7505-prepare-commit-msg-hook.sh
t/t7520-ignored-hook-warning.sh
t/test-lib-functions.sh