@@ -1068,23 +1068,42 @@ test_expect_success 'clean' '
1068
1068
test_all_match git commit -m "ignore bogus files" &&
1069
1069
1070
1070
run_on_sparse mkdir folder1 &&
1071
+ run_on_all mkdir -p deep/untracked-deep &&
1071
1072
run_on_all touch folder1/bogus &&
1073
+ run_on_all touch folder1/untracked &&
1074
+ run_on_all touch deep/untracked-deep/bogus &&
1075
+ run_on_all touch deep/untracked-deep/untracked &&
1072
1076
1073
1077
test_all_match git status --porcelain=v2 &&
1074
1078
test_all_match git clean -f &&
1075
1079
test_all_match git status --porcelain=v2 &&
1076
1080
test_sparse_match ls &&
1077
1081
test_sparse_match ls folder1 &&
1082
+ run_on_all test_path_exists folder1/bogus &&
1083
+ run_on_all test_path_is_missing folder1/untracked &&
1084
+ run_on_all test_path_exists deep/untracked-deep/bogus &&
1085
+ run_on_all test_path_exists deep/untracked-deep/untracked &&
1086
+
1087
+ test_all_match git clean -fd &&
1088
+ test_all_match git status --porcelain=v2 &&
1089
+ test_sparse_match ls &&
1090
+ test_sparse_match ls folder1 &&
1091
+ run_on_all test_path_exists folder1/bogus &&
1092
+ run_on_all test_path_exists deep/untracked-deep/bogus &&
1093
+ run_on_all test_path_is_missing deep/untracked-deep/untracked &&
1078
1094
1079
1095
test_all_match git clean -xf &&
1080
1096
test_all_match git status --porcelain=v2 &&
1081
1097
test_sparse_match ls &&
1082
1098
test_sparse_match ls folder1 &&
1099
+ run_on_all test_path_is_missing folder1/bogus &&
1100
+ run_on_all test_path_exists deep/untracked-deep/bogus &&
1083
1101
1084
1102
test_all_match git clean -xdf &&
1085
1103
test_all_match git status --porcelain=v2 &&
1086
1104
test_sparse_match ls &&
1087
1105
test_sparse_match ls folder1 &&
1106
+ run_on_all test_path_is_missing deep/untracked-deep/bogus &&
1088
1107
1089
1108
test_sparse_match test_path_is_dir folder1
1090
1109
'
@@ -1202,6 +1221,8 @@ test_expect_success 'sparse-index is not expanded' '
1202
1221
git -C sparse-index add README.md &&
1203
1222
ensure_not_expanded diff --staged &&
1204
1223
1224
+ ensure_not_expanded clean -fd &&
1225
+
1205
1226
ensure_not_expanded checkout -f update-deep &&
1206
1227
(
1207
1228
sane_unset GIT_TEST_MERGE_ALGORITHM &&
0 commit comments