File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -2089,22 +2089,32 @@ test_expect_success 'grep sparse directory within submodules' '
20892089 test_cmp actual expect
20902090'
20912091
2092- test_expect_success ' write-tree on all ' '
2092+ test_expect_success ' write-tree' '
20932093 init_repos &&
20942094
2095+ test_all_match git write-tree &&
2096+
20952097 write_script edit-contents <<-\EOF &&
20962098 echo text >>"$1"
20972099 EOF
20982100
2101+ # make a change inside the sparse cone
20992102 run_on_all ../edit-contents deep/a &&
2100- run_on_all git update-index deep/a &&
2103+ test_all_match git update-index deep/a &&
21012104 test_all_match git write-tree &&
2105+ test_all_match git status --porcelain=v2 &&
21022106
2107+ # make a change outside the sparse cone
21032108 run_on_all mkdir -p folder1 &&
21042109 run_on_all cp a folder1/a &&
21052110 run_on_all ../edit-contents folder1/a &&
2106- run_on_all git update-index folder1/a &&
2107- test_all_match git write-tree
2111+ test_all_match git update-index folder1/a &&
2112+ test_all_match git write-tree &&
2113+ test_all_match git status --porcelain=v2 &&
2114+
2115+ # check that SKIP_WORKTREE files are not materialized
2116+ test_path_is_missing sparse-checkout/folder2/a &&
2117+ test_path_is_missing sparse-index/folder2/a
21082118'
21092119
21102120test_expect_success ' sparse-index is not expanded: write-tree' '
You can’t perform that action at this time.
0 commit comments