1
+ use std:: sync:: atomic:: AtomicBool ;
1
2
use std:: sync:: {
2
3
atomic:: { AtomicUsize , Ordering } ,
3
4
Arc ,
@@ -75,6 +76,7 @@ fn fixture_filtered_detailed(
75
76
|_, _| Ok :: < _ , std:: convert:: Infallible > ( gix_object:: BlobRef { data : & [ ] } ) ,
76
77
& mut gix_features:: progress:: Discard ,
77
78
Pathspec ( search) ,
79
+ & AtomicBool :: default ( ) ,
78
80
Options {
79
81
fs : gix_fs:: Capabilities :: probe ( & git_dir) ,
80
82
stat : TEST_OPTIONS ,
@@ -131,6 +133,8 @@ fn removed() {
131
133
assert_eq ! (
132
134
out,
133
135
Outcome {
136
+ entries_to_process: 4 ,
137
+ entries_processed: 4 ,
134
138
symlink_metadata_calls: 4 ,
135
139
..Default :: default ( )
136
140
}
@@ -147,6 +151,8 @@ fn removed() {
147
151
assert_eq ! (
148
152
out,
149
153
Outcome {
154
+ entries_to_process: 2 ,
155
+ entries_processed: 2 ,
150
156
entries_skipped_by_common_prefix: 2 ,
151
157
symlink_metadata_calls: 2 ,
152
158
..Default :: default ( )
@@ -159,6 +165,8 @@ fn subomdule_nochange() {
159
165
assert_eq ! (
160
166
ignore_racyclean( submodule_fixture( "no-change" , & [ ] ) ) ,
161
167
Outcome {
168
+ entries_to_process: 2 ,
169
+ entries_processed: 2 ,
162
170
entries_updated: 1 ,
163
171
symlink_metadata_calls: 2 ,
164
172
worktree_bytes: 46 ,
@@ -176,6 +184,8 @@ fn subomdule_deleted_dir() {
176
184
& [ ( BStr :: new( b"m1" ) , Some ( Change :: Removed ) , NO_CONFLICT ) ]
177
185
) ) ,
178
186
Outcome {
187
+ entries_to_process: 2 ,
188
+ entries_processed: 2 ,
179
189
entries_updated: 1 ,
180
190
symlink_metadata_calls: 2 ,
181
191
worktree_files_read: 1 ,
@@ -193,6 +203,8 @@ fn subomdule_typechange() {
193
203
& [ ( BStr :: new( b"m1" ) , Some ( Change :: Type ) , NO_CONFLICT ) ]
194
204
) ) ,
195
205
Outcome {
206
+ entries_to_process: 2 ,
207
+ entries_processed: 2 ,
196
208
entries_updated: 1 ,
197
209
symlink_metadata_calls: 2 ,
198
210
worktree_files_read: 1 ,
@@ -207,6 +219,8 @@ fn subomdule_empty_dir_no_change() {
207
219
assert_eq ! (
208
220
ignore_racyclean( submodule_fixture( "empty-dir-no-change" , & [ ] ) ) ,
209
221
Outcome {
222
+ entries_to_process: 2 ,
223
+ entries_processed: 2 ,
210
224
entries_updated: 1 ,
211
225
symlink_metadata_calls: 2 ,
212
226
worktree_files_read: 1 ,
@@ -225,6 +239,8 @@ fn subomdule_empty_dir_no_change_is_passed_to_submodule_handler() {
225
239
true ,
226
240
) ) ,
227
241
Outcome {
242
+ entries_to_process: 2 ,
243
+ entries_processed: 2 ,
228
244
entries_updated: 1 ,
229
245
symlink_metadata_calls: 2 ,
230
246
worktree_files_read: 1 ,
@@ -242,6 +258,8 @@ fn intent_to_add() {
242
258
& [ ( BStr :: new( b"content" ) , Some ( Change :: IntentToAdd ) , NO_CONFLICT ) ] ,
243
259
) ,
244
260
Outcome {
261
+ entries_to_process: 1 ,
262
+ entries_processed: 1 ,
245
263
symlink_metadata_calls: 1 ,
246
264
..Default :: default ( )
247
265
}
@@ -263,6 +281,8 @@ fn conflict() {
263
281
) ] ,
264
282
) ,
265
283
Outcome {
284
+ entries_to_process: 3 ,
285
+ entries_processed: 3 ,
266
286
symlink_metadata_calls: 1 ,
267
287
worktree_files_read: 1 ,
268
288
worktree_bytes: 51 ,
@@ -314,6 +334,8 @@ fn modified() {
314
334
] ,
315
335
) ,
316
336
Outcome {
337
+ entries_to_process: 5 ,
338
+ entries_processed: 5 ,
317
339
symlink_metadata_calls: 5 ,
318
340
entries_updated: 1 ,
319
341
worktree_files_read: 2 ,
@@ -379,6 +401,7 @@ fn racy_git() {
379
401
|_, _| Err ( std:: io:: Error :: new ( std:: io:: ErrorKind :: Other , "no odb access expected" ) ) ,
380
402
& mut gix_features:: progress:: Discard ,
381
403
Pathspec :: default ( ) ,
404
+ & AtomicBool :: default ( ) ,
382
405
Options {
383
406
fs,
384
407
stat : TEST_OPTIONS ,
@@ -389,6 +412,8 @@ fn racy_git() {
389
412
assert_eq ! (
390
413
out,
391
414
Outcome {
415
+ entries_to_process: 1 ,
416
+ entries_processed: 1 ,
392
417
symlink_metadata_calls: 1 ,
393
418
..Default :: default ( )
394
419
}
@@ -414,6 +439,7 @@ fn racy_git() {
414
439
|_, _| Err ( std:: io:: Error :: new ( std:: io:: ErrorKind :: Other , "no odb access expected" ) ) ,
415
440
& mut gix_features:: progress:: Discard ,
416
441
Pathspec :: default ( ) ,
442
+ & AtomicBool :: default ( ) ,
417
443
Options {
418
444
fs,
419
445
stat : TEST_OPTIONS ,
@@ -424,6 +450,8 @@ fn racy_git() {
424
450
assert_eq ! (
425
451
out,
426
452
Outcome {
453
+ entries_to_process: 1 ,
454
+ entries_processed: 1 ,
427
455
symlink_metadata_calls: 1 ,
428
456
racy_clean: 1 ,
429
457
worktree_bytes: 3 ,
0 commit comments