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/t3507-cherry-pick-conflict.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/t3507-cherry-pick-conflict.sh')
-rwxr-xr-x | t/t3507-cherry-pick-conflict.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/t/t3507-cherry-pick-conflict.sh b/t/t3507-cherry-pick-conflict.sh index 979e843c65..f32799e046 100755 --- a/t/t3507-cherry-pick-conflict.sh +++ b/t/t3507-cherry-pick-conflict.sh @@ -12,6 +12,7 @@ test_description='test cherry-pick and revert with conflicts GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +TEST_CREATE_REPO_NO_TEMPLATE=1 . ./test-lib.sh pristine_detach () { @@ -558,6 +559,7 @@ test_expect_success 'cherry-pick preserves sparse-checkout' ' echo \"/*\" >.git/info/sparse-checkout git read-tree --reset -u HEAD rm .git/info/sparse-checkout" && + mkdir .git/info && echo /unrelated >.git/info/sparse-checkout && git read-tree --reset -u HEAD && test_must_fail git cherry-pick -Xours picked>actual && |