@@ -62,7 +62,6 @@ static const char rev_list_usage[] =
62
62
static struct progress * progress ;
63
63
static unsigned progress_counter ;
64
64
65
- static struct list_objects_filter_options filter_options ;
66
65
static struct oidset omitted_objects ;
67
66
static int arg_print_omitted ; /* print objects omitted by filter */
68
67
@@ -400,7 +399,6 @@ static inline int parse_missing_action_value(const char *value)
400
399
}
401
400
402
401
static int try_bitmap_count (struct rev_info * revs ,
403
- struct list_objects_filter_options * filter ,
404
402
int filter_provided_objects )
405
403
{
406
404
uint32_t commit_count = 0 ,
@@ -436,7 +434,8 @@ static int try_bitmap_count(struct rev_info *revs,
436
434
*/
437
435
max_count = revs -> max_count ;
438
436
439
- bitmap_git = prepare_bitmap_walk (revs , filter , filter_provided_objects );
437
+ bitmap_git = prepare_bitmap_walk (revs , & revs -> filter ,
438
+ filter_provided_objects );
440
439
if (!bitmap_git )
441
440
return -1 ;
442
441
@@ -453,7 +452,6 @@ static int try_bitmap_count(struct rev_info *revs,
453
452
}
454
453
455
454
static int try_bitmap_traversal (struct rev_info * revs ,
456
- struct list_objects_filter_options * filter ,
457
455
int filter_provided_objects )
458
456
{
459
457
struct bitmap_index * bitmap_git ;
@@ -465,7 +463,8 @@ static int try_bitmap_traversal(struct rev_info *revs,
465
463
if (revs -> max_count >= 0 )
466
464
return -1 ;
467
465
468
- bitmap_git = prepare_bitmap_walk (revs , filter , filter_provided_objects );
466
+ bitmap_git = prepare_bitmap_walk (revs , & revs -> filter ,
467
+ filter_provided_objects );
469
468
if (!bitmap_git )
470
469
return -1 ;
471
470
@@ -475,15 +474,14 @@ static int try_bitmap_traversal(struct rev_info *revs,
475
474
}
476
475
477
476
static int try_bitmap_disk_usage (struct rev_info * revs ,
478
- struct list_objects_filter_options * filter ,
479
477
int filter_provided_objects )
480
478
{
481
479
struct bitmap_index * bitmap_git ;
482
480
483
481
if (!show_disk_usage )
484
482
return -1 ;
485
483
486
- bitmap_git = prepare_bitmap_walk (revs , filter , filter_provided_objects );
484
+ bitmap_git = prepare_bitmap_walk (revs , & revs -> filter , filter_provided_objects );
487
485
if (!bitmap_git )
488
486
return -1 ;
489
487
@@ -597,13 +595,13 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
597
595
}
598
596
599
597
if (skip_prefix (arg , ("--" CL_ARG__FILTER "=" ), & arg )) {
600
- parse_list_objects_filter (& filter_options , arg );
601
- if (filter_options .choice && !revs .blob_objects )
598
+ parse_list_objects_filter (& revs . filter , arg );
599
+ if (revs . filter .choice && !revs .blob_objects )
602
600
die (_ ("object filtering requires --objects" ));
603
601
continue ;
604
602
}
605
603
if (!strcmp (arg , ("--no-" CL_ARG__FILTER ))) {
606
- list_objects_filter_set_no_filter (& filter_options );
604
+ list_objects_filter_set_no_filter (& revs . filter );
607
605
continue ;
608
606
}
609
607
if (!strcmp (arg , "--filter-provided-objects" )) {
@@ -688,11 +686,11 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
688
686
progress = start_delayed_progress (show_progress , 0 );
689
687
690
688
if (use_bitmap_index ) {
691
- if (!try_bitmap_count (& revs , & filter_options , filter_provided_objects ))
689
+ if (!try_bitmap_count (& revs , filter_provided_objects ))
692
690
return 0 ;
693
- if (!try_bitmap_disk_usage (& revs , & filter_options , filter_provided_objects ))
691
+ if (!try_bitmap_disk_usage (& revs , filter_provided_objects ))
694
692
return 0 ;
695
- if (!try_bitmap_traversal (& revs , & filter_options , filter_provided_objects ))
693
+ if (!try_bitmap_traversal (& revs , filter_provided_objects ))
696
694
return 0 ;
697
695
}
698
696
@@ -733,7 +731,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
733
731
oidset_init (& missing_objects , DEFAULT_OIDSET_SIZE );
734
732
735
733
traverse_commit_list_filtered (
736
- & filter_options , & revs , show_commit , show_object , & info ,
734
+ & revs . filter , & revs , show_commit , show_object , & info ,
737
735
(arg_print_omitted ? & omitted_objects : NULL ));
738
736
739
737
if (arg_print_omitted ) {
0 commit comments