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 12:00:21 -0700 |
commit | ead74601c6ed7171e9e736e329b45c12d90153e4 (patch) | |
tree | 767934eb412412123a3181020f98c41f2f3c3a42 /t/t2018-checkout-branch.sh | |
parent | 1d758728fb26f574169b7f0b420e59af1d0c3c84 (diff) | |
download | git-ead74601c6ed7171e9e736e329b45c12d90153e4.tar.gz |
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/t2018-checkout-branch.sh')
-rwxr-xr-x | t/t2018-checkout-branch.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/t/t2018-checkout-branch.sh b/t/t2018-checkout-branch.sh index 52e51b0726..771c3c3c50 100755 --- a/t/t2018-checkout-branch.sh +++ b/t/t2018-checkout-branch.sh @@ -2,6 +2,7 @@ test_description='checkout' +TEST_CREATE_REPO_NO_TEMPLATE=1 . ./test-lib.sh # Arguments: [!] <branch> <oid> [<checkout options>] @@ -257,11 +258,12 @@ test_expect_success 'checkout -b to a new branch preserves mergeable changes des git checkout branch1-scratch && test_might_fail git branch -D branch3 && git config core.sparseCheckout false && - rm .git/info/sparse-checkout" && + rm -rf .git/info" && test_commit file2 && echo stuff >>file1 && + mkdir .git/info && echo file2 >.git/info/sparse-checkout && git config core.sparseCheckout true && |