t1501: fix test with split index
PATCH 1/1 t1501: fix test with split index
t1501-worktree.sh does not copy the shared index in the "relative $GIT_WORK_TREE and git subprocesses" test, which makes the test fail when GIT_TEST_SPLIT_INDEX is set. Copy the shared index as well in order to fix this.
---
This applies on top of nd/multiple-work-trees. Sorry for not catching it earlier, but I haven't tried to run the test-suite for the next branch then, where this appears.
t/t1501-worktree.sh | 1 + 1 file changed, 1 insertion(+)
t/t1501-worktree.sh +1 -0
@@ -350,6 +350,7 @@ test_expect_success 'Multi-worktree setup' ' mkdir work && mkdir -p repo.git/repos/foo && cp repo.git/HEAD repo.git/index repo.git/repos/foo && + ( cp repo.git/sharedindex.* repo.git/repos/foo 2>/dev/null || : ) && sane_unset GIT_DIR GIT_CONFIG GIT_WORK_TREE '
Signature · 1 line
2.1.0.264.g0463184.dirty
Quoted 20 lines · Thomas Gummerer
t1501-worktree.shdoes not copy the shared index in the "relative $GIT_WORK_TREE and git subprocesses" test, which makes the test fail whenGIT_TEST_SPLIT_INDEXis set. Copy the shared index as well in order to fix this.Signed-off-by Thomas Gummerer <[email protected]>---
This applies on top of nd/multiple-work-trees. Sorry for not catching it earlier, but I haven't tried to run the test-suite for the next branch then, where this appears.
t/t1501-worktree.sh | 1 + 1 file changed, 1 insertion(+)t/t1501-worktree.sh +0
-0
t/t1501-worktree.sh test_expect_success 'Multi-worktree setup' ' · line 353
Quoted 4 lines
t/t1501-worktree.sh +1
-0@@ -350,6 +350,7 @@ test_expect_success 'Multi-worktree setup' ' mkdir work && mkdir -p repo.git/repos/foo && cp repo.git/HEAD repo.git/index repo.git/repos/foo && + ( cp repo.git/sharedindex.* repo.git/repos/foo 2>/dev/null || : ) &&
Is this a good place to use "test-might-fail", e.g.
test_might_fail cp repo.git/sharedindex.* repo.git/repos/foo &&
or something?
Quoted 2 lines
t/t1501-worktree.sh +0
-0sane_unset GIT_DIR GIT_CONFIG GIT_WORK_TREE '
PATCH v2 1/1 t1501: fix test with split index
t1501-worktree.sh does not copy the shared index in the "relative $GIT_WORK_TREE and git subprocesses" test, which makes the test fail when GIT_TEST_SPLIT_INDEX is set. Copy the shared index as well in order to fix this.
---
Quoted 5 lines
Is this a good place to use "test-might-fail", e.g.
test_might_fail cp repo.git/sharedindex.* repo.git/repos/foo &&or something?
Yeah that makes sense, thanks.
t/t1501-worktree.sh | 1 + 1 file changed, 1 insertion(+)
t/t1501-worktree.sh +1 -0
@@ -350,6 +350,7 @@ test_expect_success 'Multi-worktree setup' ' mkdir work && mkdir -p repo.git/repos/foo && cp repo.git/HEAD repo.git/index repo.git/repos/foo && + test_might_fail cp repo.git/sharedindex.* repo.git/repos/foo && sane_unset GIT_DIR GIT_CONFIG GIT_WORK_TREE '
Signature · 1 line
2.1.0.264.g0463184.dirty