[PATCH 1/2] t3415: remove prepare-commit-msg hook after use
- From
Harald Nordgren via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Jun 14, 2026, 19:25 UTC
- Message-ID
- <c55b9cd6f749bf1470dba46e6bfea4c0472d3490.1781465141.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.2337.git.git.1781465141.gitgitgadget@gmail.com>
From: Harald Nordgren <haraldnordgren@gmail.com>
The "pick and fixup respect commit.cleanup" test left its prepare-commit-msg hook in place, leaking it into later tests. Remove it with test_when_finished.
Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com> --- t/t3415-rebase-autosquash.sh | 1 + 1 file changed, 1 insertion(+)
diff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh index 5033411a43..8964d1cc88 100755 --- a/t/t3415-rebase-autosquash.sh +++ b/t/t3415-rebase-autosquash.sh @@ -490,6 +490,7 @@ test_expect_success 'pick and fixup respect commit.cleanup' ' git reset --hard base && test_commit --no-tag "fixup! second commit" file1 fixup && test_commit something && + test_when_finished "rm -f .git/hooks/prepare-commit-msg" && write_script .git/hooks/prepare-commit-msg <<-\EOF && printf "\n# Prepared\n" >> "$1" EOF
-- gitgitgadget