Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t7520-ignored-hook-warning.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t7520-ignored-hook-warning.sh` 38 lines ยท 1015 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='ignored hook warning' 4 5 . ./test-lib.sh 6 7 test_expect_success setup ' 8 test_hook --setup pre-commit <<-\EOF 9 exit 0 10 EOF 11 ' 12 13 test_expect_success 'no warning if hook is not ignored' ' 14 git commit --allow-empty -m "more" 2>message && 15 test_grep ! -e "hook was ignored" message 16 ' 17 18 test_expect_success POSIXPERM 'warning if hook is ignored' ' 19 test_hook --disable pre-commit && 20 git commit --allow-empty -m "even more" 2>message && 21 test_grep -e "hook was ignored" message 22 ' 23 24 test_expect_success POSIXPERM 'no warning if advice.ignoredHook set to false' ' 25 test_config advice.ignoredHook false && 26 test_hook --disable pre-commit && 27 git commit --allow-empty -m "even more" 2>message && 28 test_grep ! -e "hook was ignored" message 29 ' 30 31 test_expect_success 'no warning if unset advice.ignoredHook and hook removed' ' 32 test_hook --remove pre-commit && 33 test_unconfig advice.ignoredHook && 34 git commit --allow-empty -m "even more" 2>message && 35 test_grep ! -e "hook was ignored" message 36 ' 37 38 test_done