@@ -1123,23 +1123,42 @@ test_expect_success 'clean' '
11231123 test_all_match git commit -m "ignore bogus files" &&
11241124
11251125 run_on_sparse mkdir folder1 &&
1126+ run_on_all mkdir -p deep/untracked-deep &&
11261127 run_on_all touch folder1/bogus &&
1128+ run_on_all touch folder1/untracked &&
1129+ run_on_all touch deep/untracked-deep/bogus &&
1130+ run_on_all touch deep/untracked-deep/untracked &&
11271131
11281132 test_all_match git status --porcelain=v2 &&
11291133 test_all_match git clean -f &&
11301134 test_all_match git status --porcelain=v2 &&
11311135 test_sparse_match ls &&
11321136 test_sparse_match ls folder1 &&
1137+ run_on_all test_path_exists folder1/bogus &&
1138+ run_on_all test_path_is_missing folder1/untracked &&
1139+ run_on_all test_path_exists deep/untracked-deep/bogus &&
1140+ run_on_all test_path_exists deep/untracked-deep/untracked &&
1141+
1142+ test_all_match git clean -fd &&
1143+ test_all_match git status --porcelain=v2 &&
1144+ test_sparse_match ls &&
1145+ test_sparse_match ls folder1 &&
1146+ run_on_all test_path_exists folder1/bogus &&
1147+ run_on_all test_path_exists deep/untracked-deep/bogus &&
1148+ run_on_all test_path_is_missing deep/untracked-deep/untracked &&
11331149
11341150 test_all_match git clean -xf &&
11351151 test_all_match git status --porcelain=v2 &&
11361152 test_sparse_match ls &&
11371153 test_sparse_match ls folder1 &&
1154+ run_on_all test_path_is_missing folder1/bogus &&
1155+ run_on_all test_path_exists deep/untracked-deep/bogus &&
11381156
11391157 test_all_match git clean -xdf &&
11401158 test_all_match git status --porcelain=v2 &&
11411159 test_sparse_match ls &&
11421160 test_sparse_match ls folder1 &&
1161+ run_on_all test_path_is_missing deep/untracked-deep/bogus &&
11431162
11441163 test_sparse_match test_path_is_dir folder1
11451164'
@@ -1290,6 +1309,8 @@ test_expect_success 'sparse-index is not expanded' '
12901309 git -C sparse-index add README.md &&
12911310 ensure_not_expanded diff --staged &&
12921311
1312+ ensure_not_expanded clean -fd &&
1313+
12931314 ensure_not_expanded reset base -- deep/a &&
12941315 ensure_not_expanded reset base -- nonexistent-file &&
12951316 ensure_not_expanded reset deepest -- deep &&
0 commit comments