Skip to content

Commit 6a6621f

Browse files
committed
Merge branch 'sl/sparse-write-tree-part-2'
Fix-up to a topic already graduated to 'master'. * sl/sparse-write-tree-part-2: t1092: update a write-tree test
2 parents 9e49351 + 6e21017 commit 6a6621f

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

t/t1092-sparse-checkout-compatibility.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff 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

21102120
test_expect_success 'sparse-index is not expanded: write-tree' '

0 commit comments

Comments
 (0)