Skip to content

Commit f3ef347

Browse files
chenjianhugitster
authored andcommitted
t7450: inspect the correct path a broken code would write to
Prior to 05e9cd6 (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 47d3b50 commit f3ef347

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t7450-bad-git-dotfiles.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ test_expect_success SYMLINKS,!WINDOWS,!MINGW 'submodule must not checkout into d
402402
git -C repo commit -m submodule &&
403403
404404
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" &&
406406
test -f $(printf "bad-clone/sub\r/post-checkout")
407407
'
408408

0 commit comments

Comments
 (0)