@@ -1111,23 +1111,42 @@ test_expect_success 'clean' '
1111
1111
test_all_match git commit -m "ignore bogus files" &&
1112
1112
1113
1113
run_on_sparse mkdir folder1 &&
1114
+ run_on_all mkdir -p deep/untracked-deep &&
1114
1115
run_on_all touch folder1/bogus &&
1116
+ run_on_all touch folder1/untracked &&
1117
+ run_on_all touch deep/untracked-deep/bogus &&
1118
+ run_on_all touch deep/untracked-deep/untracked &&
1115
1119
1116
1120
test_all_match git status --porcelain=v2 &&
1117
1121
test_all_match git clean -f &&
1118
1122
test_all_match git status --porcelain=v2 &&
1119
1123
test_sparse_match ls &&
1120
1124
test_sparse_match ls folder1 &&
1125
+ run_on_all test_path_exists folder1/bogus &&
1126
+ run_on_all test_path_is_missing folder1/untracked &&
1127
+ run_on_all test_path_exists deep/untracked-deep/bogus &&
1128
+ run_on_all test_path_exists deep/untracked-deep/untracked &&
1129
+
1130
+ test_all_match git clean -fd &&
1131
+ test_all_match git status --porcelain=v2 &&
1132
+ test_sparse_match ls &&
1133
+ test_sparse_match ls folder1 &&
1134
+ run_on_all test_path_exists folder1/bogus &&
1135
+ run_on_all test_path_exists deep/untracked-deep/bogus &&
1136
+ run_on_all test_path_is_missing deep/untracked-deep/untracked &&
1121
1137
1122
1138
test_all_match git clean -xf &&
1123
1139
test_all_match git status --porcelain=v2 &&
1124
1140
test_sparse_match ls &&
1125
1141
test_sparse_match ls folder1 &&
1142
+ run_on_all test_path_is_missing folder1/bogus &&
1143
+ run_on_all test_path_exists deep/untracked-deep/bogus &&
1126
1144
1127
1145
test_all_match git clean -xdf &&
1128
1146
test_all_match git status --porcelain=v2 &&
1129
1147
test_sparse_match ls &&
1130
1148
test_sparse_match ls folder1 &&
1149
+ run_on_all test_path_is_missing deep/untracked-deep/bogus &&
1131
1150
1132
1151
test_sparse_match test_path_is_dir folder1
1133
1152
'
@@ -1251,6 +1270,8 @@ test_expect_success 'sparse-index is not expanded' '
1251
1270
git -C sparse-index add README.md &&
1252
1271
ensure_not_expanded diff --staged &&
1253
1272
1273
+ ensure_not_expanded clean -fd &&
1274
+
1254
1275
ensure_not_expanded reset base -- deep/a &&
1255
1276
ensure_not_expanded reset base -- nonexistent-file &&
1256
1277
ensure_not_expanded reset deepest -- deep &&
0 commit comments