Skip to content

Commit edc0f60

Browse files
committed
fixup! diff: enable and test the sparse index
Update tests for diff to successfully `echo`. Signed-off-by: Victoria Dye <[email protected]>
1 parent 2aabbd5 commit edc0f60

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

t/t1092-sparse-checkout-compatibility.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -390,22 +390,26 @@ test_expect_success 'diff --staged' '
390390
test_expect_success 'diff partially-staged' '
391391
init_repos &&
392392
393+
write_script edit-contents <<-\EOF &&
394+
echo text >>$1
395+
EOF
396+
393397
# Add file within cone
394398
test_all_match git sparse-checkout set deep &&
395-
run_on_all 'echo >deep/testfile' &&
399+
run_on_all ../edit-contents deep/testfile &&
396400
test_all_match git add deep/testfile &&
397-
run_on_all 'echo a new line >>deep/testfile' &&
401+
run_on_all ../edit-contents deep/testfile &&
398402
399403
test_all_match git diff &&
400404
test_all_match git diff --staged &&
401405
402406
# Add file outside cone
403407
test_all_match git reset --hard &&
404408
run_on_all mkdir newdirectory &&
405-
run_on_all 'echo >newdirectory/testfile' &&
409+
run_on_all ../edit-contents newdirectory/testfile &&
406410
test_all_match git sparse-checkout set newdirectory &&
407411
test_all_match git add newdirectory/testfile &&
408-
run_on_all 'echo a new line >>newdirectory/testfile' &&
412+
run_on_all ../edit-contents newdirectory/testfile &&
409413
test_all_match git sparse-checkout set &&
410414
411415
test_all_match git diff &&

0 commit comments

Comments
 (0)