546
test_all_match git status --porcelain=v2 &&
547
548
# 2. Add the file with conflict markers
549
- # NEEDSWORK: Even though the merge conflict removed the
550
- # SKIP_WORKTREE bit from the index entry for folder1/a, we should
551
- # warn that this is a problematic add.
552
- test_all_match git add folder1/a &&
549
+ test_sparse_match test_must_fail git add folder1/a &&
550
+ grep "Disable or modify the sparsity rules" sparse-checkout-err &&
551
+ test_sparse_unstaged folder1/a &&
552
test_all_match git status --porcelain=v2 &&
553
554
# 3. Rename the file to another sparse filename and
557
# NEEDSWORK: This mode now fails, because folder2/z is
558
# outside of the sparse-checkout cone and does not match an
559
# existing index entry with the SKIP_WORKTREE bit cleared.
561
- test_all_match git add folder2 &&
560
+ test_sparse_match test_must_fail git add folder2 &&
561
+ grep "Disable or modify the sparsity rules" sparse-checkout-err &&
562
+ test_sparse_unstaged folder2/z &&
563
test_all_match git status --porcelain=v2 &&
564
565
test_all_match git merge --continue &&
587
# NEEDSWORK: Even though the merge conflict removed the
588
# SKIP_WORKTREE bit from the index entry for folder1/a, we should
589
# warn that this is a problematic add.
589
- test_all_match git add folder1/a &&
590
+ test_sparse_match test_must_fail git add folder1/a &&
591
+ grep "Disable or modify the sparsity rules" sparse-checkout-err &&
592
+ test_sparse_unstaged folder1/a &&
593
test_all_match git status --porcelain=v2 &&
594
595
# 3. Rename the file to another sparse filename and
598
# outside of the sparse-checkout cone and does not match an
599
# existing index entry with the SKIP_WORKTREE bit cleared.
600
run_on_all mv folder2/a folder2/z &&
598
- test_all_match git add folder2 &&
601
+ test_sparse_match test_must_fail git add folder2 &&
602
+ grep "Disable or modify the sparsity rules" sparse-checkout-err &&
603
+ test_sparse_unstaged folder2/z &&
604
test_all_match git status --porcelain=v2 &&
605
606
test_all_match git $OPERATION --continue &&