@@ -1223,23 +1223,42 @@ test_expect_success 'clean' '
12231223 test_all_match git commit -m "ignore bogus files" &&
12241224
12251225 run_on_sparse mkdir folder1 &&
1226+ run_on_all mkdir -p deep/untracked-deep &&
12261227 run_on_all touch folder1/bogus &&
1228+ run_on_all touch folder1/untracked &&
1229+ run_on_all touch deep/untracked-deep/bogus &&
1230+ run_on_all touch deep/untracked-deep/untracked &&
12271231
12281232 test_all_match git status --porcelain=v2 &&
12291233 test_all_match git clean -f &&
12301234 test_all_match git status --porcelain=v2 &&
12311235 test_sparse_match ls &&
12321236 test_sparse_match ls folder1 &&
1237+ run_on_all test_path_exists folder1/bogus &&
1238+ run_on_all test_path_is_missing folder1/untracked &&
1239+ run_on_all test_path_exists deep/untracked-deep/bogus &&
1240+ run_on_all test_path_exists deep/untracked-deep/untracked &&
1241+
1242+ test_all_match git clean -fd &&
1243+ test_all_match git status --porcelain=v2 &&
1244+ test_sparse_match ls &&
1245+ test_sparse_match ls folder1 &&
1246+ run_on_all test_path_exists folder1/bogus &&
1247+ run_on_all test_path_exists deep/untracked-deep/bogus &&
1248+ run_on_all test_path_is_missing deep/untracked-deep/untracked &&
12331249
12341250 test_all_match git clean -xf &&
12351251 test_all_match git status --porcelain=v2 &&
12361252 test_sparse_match ls &&
12371253 test_sparse_match ls folder1 &&
1254+ run_on_all test_path_is_missing folder1/bogus &&
1255+ run_on_all test_path_exists deep/untracked-deep/bogus &&
12381256
12391257 test_all_match git clean -xdf &&
12401258 test_all_match git status --porcelain=v2 &&
12411259 test_sparse_match ls &&
12421260 test_sparse_match ls folder1 &&
1261+ run_on_all test_path_is_missing deep/untracked-deep/bogus &&
12431262
12441263 test_sparse_match test_path_is_dir folder1
12451264'
@@ -1405,6 +1424,8 @@ test_expect_success 'sparse-index is not expanded' '
14051424 git -C sparse-index add README.md &&
14061425 ensure_not_expanded diff --staged &&
14071426
1427+ ensure_not_expanded clean -fd &&
1428+
14081429 ensure_not_expanded reset base -- deep/a &&
14091430 ensure_not_expanded reset base -- nonexistent-file &&
14101431 ensure_not_expanded reset deepest -- deep &&
0 commit comments