diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-06-03 13:15:09 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-06-06 21:00:21 +0200 |
commit | ead74601c6ed7171e9e736e329b45c12d90153e4 (patch) | |
tree | 767934eb412412123a3181020f98c41f2f3c3a42 /t/t1011-read-tree-sparse-checkout.sh | |
parent | tests: don't assume a .git/info for .git/info/exclude (diff) | |
download | git-ead74601c6ed7171e9e736e329b45c12d90153e4.tar.xz git-ead74601c6ed7171e9e736e329b45c12d90153e4.zip |
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/t1011-read-tree-sparse-checkout.sh')
-rwxr-xr-x | t/t1011-read-tree-sparse-checkout.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/t/t1011-read-tree-sparse-checkout.sh b/t/t1011-read-tree-sparse-checkout.sh index dd957be1b7..c763fa7afa 100755 --- a/t/t1011-read-tree-sparse-checkout.sh +++ b/t/t1011-read-tree-sparse-checkout.sh @@ -11,6 +11,7 @@ test_description='sparse checkout tests A init.t ' +TEST_CREATE_REPO_NO_TEMPLATE=1 . ./test-lib.sh . "$TEST_DIRECTORY"/lib-read-tree.sh @@ -53,6 +54,7 @@ test_expect_success 'read-tree without .git/info/sparse-checkout' ' ' test_expect_success 'read-tree with .git/info/sparse-checkout but disabled' ' + mkdir .git/info && echo >.git/info/sparse-checkout && read_tree_u_must_succeed -m -u HEAD && git ls-files -t >result && |