diff options
| author | Junio C Hamano <gitster@pobox.com> | 2021-10-29 15:43:16 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-10-29 15:43:16 -0700 |
| commit | 68fb83b58ed4ef8705974bc1cc47fb6bb7ca5bdd (patch) | |
| tree | 6ab3b8297c6ec5bc92f9d54f81333cebf3cd658e /t/t3705-add-sparse-checkout.sh | |
| parent | 7b3fd03e6acbc990b4dd540079368d4e85cc7f1b (diff) | |
| parent | 20141e322c8c27054c105fca5c812043c2bc7440 (diff) | |
Merge branch 'mt/fix-add-rm-with-sparse-index'
Fix-up to a topic already merged to 'master'.
* mt/fix-add-rm-with-sparse-index:
add, rm, mv: fix bug that prevents the update of non-sparse dirs
Diffstat (limited to 't/t3705-add-sparse-checkout.sh')
| -rwxr-xr-x | t/t3705-add-sparse-checkout.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t3705-add-sparse-checkout.sh b/t/t3705-add-sparse-checkout.sh index 5b904988d4..f3143c9290 100755 --- a/t/t3705-add-sparse-checkout.sh +++ b/t/t3705-add-sparse-checkout.sh @@ -214,4 +214,21 @@ test_expect_success 'add allows sparse entries with --sparse' ' test_must_be_empty stderr ' +test_expect_success 'can add files from non-sparse dir' ' + git sparse-checkout set w !/x y/ && + mkdir -p w x/y && + touch w/f x/y/f && + git add w/f x/y/f 2>stderr && + test_must_be_empty stderr +' + +test_expect_success 'refuse to add non-skip-worktree file from sparse dir' ' + git sparse-checkout set !/x y/ !x/y/z && + mkdir -p x/y/z && + touch x/y/z/f && + test_must_fail git add x/y/z/f 2>stderr && + echo x/y/z/f | cat sparse_error_header - sparse_hint >expect && + test_cmp expect stderr +' + test_done |
