diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-08-08 23:23:06 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-08-08 23:23:06 +0300 |
commit | 3f61790678b9d3da1163d9274c5dd0423b72e336 (patch) | |
tree | 8e810516a4d9bf30adc62f7d179c68fad36b8644 /t/t1092-sparse-checkout-compatibility.sh | |
parent | 679aad9e82d0dfd8ef3d1f98fa4629665496cec9 (diff) | |
parent | b15207b8cf1a1930fe5eb076c08c6ddc92d9282d (diff) |
Merge branch 'vd/sparse-reset-checkout-fixes' into sy/sparse-rm
* vd/sparse-reset-checkout-fixes:
unpack-trees: unpack new trees as sparse directories
cache.h: create 'index_name_pos_sparse()'
oneway_diff: handle removed sparse directories
checkout: fix nested sparse directory diff in sparse index
Diffstat (limited to 't/t1092-sparse-checkout-compatibility.sh')
-rwxr-xr-x | t/t1092-sparse-checkout-compatibility.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/t/t1092-sparse-checkout-compatibility.sh b/t/t1092-sparse-checkout-compatibility.sh index 763c6cc684..3588dd7b10 100755 --- a/t/t1092-sparse-checkout-compatibility.sh +++ b/t/t1092-sparse-checkout-compatibility.sh @@ -372,6 +372,14 @@ test_expect_success 'deep changes during checkout' ' test_all_match git checkout base ' +test_expect_success 'checkout with modified sparse directory' ' + init_repos && + + test_all_match git checkout rename-in-to-out -- . && + test_sparse_match git sparse-checkout reapply && + test_all_match git checkout base +' + test_expect_success 'add outside sparse cone' ' init_repos && @@ -687,6 +695,23 @@ test_expect_success 'reset with wildcard pathspec' ' test_all_match git ls-files -s -- folder1 ' +test_expect_success 'reset hard with removed sparse dir' ' + init_repos && + + run_on_all git rm -r --sparse folder1 && + test_all_match git status --porcelain=v2 && + + test_all_match git reset --hard && + test_all_match git status --porcelain=v2 && + + cat >expect <<-\EOF && + folder1/ + EOF + + git -C sparse-index ls-files --sparse folder1 >out && + test_cmp expect out +' + test_expect_success 'update-index modify outside sparse definition' ' init_repos && |