summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t1011-read-tree-sparse-checkout.sh12
-rwxr-xr-xt/t1091-sparse-checkout-builtin.sh8
2 files changed, 12 insertions, 8 deletions
diff --git a/t/t1011-read-tree-sparse-checkout.sh b/t/t1011-read-tree-sparse-checkout.sh
index 63223e1..140f459 100755
--- a/t/t1011-read-tree-sparse-checkout.sh
+++ b/t/t1011-read-tree-sparse-checkout.sh
@@ -74,13 +74,19 @@ test_expect_success 'read-tree --no-sparse-checkout with empty .git/info/sparse-
test_expect_success 'read-tree with empty .git/info/sparse-checkout' '
git config core.sparsecheckout true &&
echo >.git/info/sparse-checkout &&
- read_tree_u_must_fail -m -u HEAD &&
+ read_tree_u_must_succeed -m -u HEAD &&
git ls-files --stage >result &&
test_cmp expected result &&
git ls-files -t >result &&
+ cat >expected.swt <<-\EOF &&
+ S init.t
+ S sub/added
+ S sub/addedtoo
+ S subsub/added
+ EOF
test_cmp expected.swt result &&
- test -f init.t &&
- test -f sub/added
+ ! test -f init.t &&
+ ! test -f sub/added
'
test_expect_success 'match directories with trailing slash' '
diff --git a/t/t1091-sparse-checkout-builtin.sh b/t/t1091-sparse-checkout-builtin.sh
index dee99ee..88cdde2 100755
--- a/t/t1091-sparse-checkout-builtin.sh
+++ b/t/t1091-sparse-checkout-builtin.sh
@@ -106,10 +106,8 @@ test_expect_success 'set enables config' '
cd empty-config &&
test_commit test file &&
test_path_is_missing .git/config.worktree &&
- test_must_fail git sparse-checkout set nothing &&
+ git sparse-checkout set nothing &&
test_path_is_file .git/config.worktree &&
- test_must_fail git config core.sparseCheckout &&
- git sparse-checkout set "/*" &&
test_cmp_config true core.sparseCheckout
)
'
@@ -302,8 +300,8 @@ test_expect_success 'revert to old sparse-checkout on empty update' '
echo >file &&
git add file &&
git commit -m "test" &&
- test_must_fail git sparse-checkout set nothing 2>err &&
- test_i18ngrep "Sparse checkout leaves no entry on working directory" err &&
+ git sparse-checkout set nothing 2>err &&
+ test_i18ngrep ! "Sparse checkout leaves no entry on working directory" err &&
test_i18ngrep ! ".git/index.lock" err &&
git sparse-checkout set file
)