t7450: inspect the correct path a broken code would write to

Prior to 05e9cd64 (config: quote values containing CR character, 2025-05-19), a repository can trick "clone --recurse-submodules" into running a post-checkout hook shipped with the project. The test was written to make sure the trick would no longer run the hook with the fix in the commit. However, the test did not check for the path the hook would create; correct the path to the expected one if the bug were still with us. Signed-off-by: chenjianhu <chenjianhu@kylinos.cn> Signed-off-by: Junio C Hamano <gitster@pobox.com>

chenjianhu committed Jul 31, 2025 at 03:49 UTC f3ef347bb2e0332872088bb00c8ba9801c578822
1 file changed +1 -1
t/t7450-bad-git-dotfiles.sh
+1 -1
@@ -402,7 +402,7 @@ test_expect_success SYMLINKS,!WINDOWS,!MINGW 'submodule must not checkout into d
402 git -C repo commit -m submodule &&
403
404 git -c protocol.file.allow=always clone --recurse-submodules repo bad-clone &&
405 - ! test -f "$PWD/foo" &&
405 + ! test -f "$PWD/bad-clone/sub/foo" &&
406 test -f $(printf "bad-clone/sub\r/post-checkout")
407 '
408