diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-06-03 14:15:09 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-06-06 22:00:21 +0300 |
commit | ead74601c6ed7171e9e736e329b45c12d90153e4 (patch) | |
tree | 767934eb412412123a3181020f98c41f2f3c3a42 /t/t7418-submodule-sparse-gitmodules.sh | |
parent | 1d758728fb26f574169b7f0b420e59af1d0c3c84 (diff) |
tests: don't assume a .git/info for .git/info/sparse-checkout
Change those tests that assumed that a .git/info directory would be
created for them when writing .git/info/sparse-checkout to explicitly
create the directory by setting "TEST_CREATE_REPO_NO_TEMPLATE=1"
before sourcing test-lib.sh, and using the "--template=" argument to
"git clone".
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7418-submodule-sparse-gitmodules.sh')
-rwxr-xr-x | t/t7418-submodule-sparse-gitmodules.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t7418-submodule-sparse-gitmodules.sh b/t/t7418-submodule-sparse-gitmodules.sh index f87e524d6d..57d7ab3ece 100755 --- a/t/t7418-submodule-sparse-gitmodules.sh +++ b/t/t7418-submodule-sparse-gitmodules.sh @@ -31,8 +31,9 @@ test_expect_success 'sparse checkout setup which hides .gitmodules' ' test_tick && git commit -m "Add submodule" ) && - git clone upstream super && + git clone --template= upstream super && (cd super && + mkdir .git/info && cat >.git/info/sparse-checkout <<-\EOF && /* !/.gitmodules |