Skip to content

Commit 72064ee

Browse files
newrengitster
authored andcommitted
t1091: make some tests a little more defensive against failures
Reviewed-by: Derrick Stolee <[email protected]> Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fa0bde4 commit 72064ee

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

t/t1091-sparse-checkout-builtin.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ test_expect_success 'cone mode: add parent path' '
278278
'
279279

280280
test_expect_success 'revert to old sparse-checkout on bad update' '
281+
test_when_finished git -C repo sparse-checkout disable &&
281282
test_when_finished git -C repo reset --hard &&
282283
git -C repo sparse-checkout set deep &&
283284
echo update >repo/deep/deeper2/a &&
@@ -328,6 +329,7 @@ test_expect_success 'sparse-checkout (init|set|disable) fails with dirty status'
328329
'
329330

330331
test_expect_success 'cone mode: set with core.ignoreCase=true' '
332+
rm repo/.git/info/sparse-checkout &&
331333
git -C repo sparse-checkout init --cone &&
332334
git -C repo -c core.ignoreCase=true sparse-checkout set folder1 &&
333335
cat >expect <<-\EOF &&

0 commit comments

Comments
 (0)