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>
This commit is contained in:
committed by
Junio C Hamano
parent
47d3b506d4
commit
f3ef347bb2
@@ -402,7 +402,7 @@ test_expect_success SYMLINKS,!WINDOWS,!MINGW 'submodule must not checkout into d
|
|||||||
git -C repo commit -m submodule &&
|
git -C repo commit -m submodule &&
|
||||||
|
|
||||||
git -c protocol.file.allow=always clone --recurse-submodules repo bad-clone &&
|
git -c protocol.file.allow=always clone --recurse-submodules repo bad-clone &&
|
||||||
! test -f "$PWD/foo" &&
|
! test -f "$PWD/bad-clone/sub/foo" &&
|
||||||
test -f $(printf "bad-clone/sub\r/post-checkout")
|
test -f $(printf "bad-clone/sub\r/post-checkout")
|
||||||
'
|
'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user