@@ -62,7 +62,6 @@ static const char rev_list_usage[] =
6262static struct progress * progress ;
6363static unsigned progress_counter ;
6464
65- static struct list_objects_filter_options filter_options ;
6665static struct oidset omitted_objects ;
6766static int arg_print_omitted ; /* print objects omitted by filter */
6867
@@ -400,7 +399,6 @@ static inline int parse_missing_action_value(const char *value)
400399}
401400
402401static int try_bitmap_count (struct rev_info * revs ,
403- struct list_objects_filter_options * filter ,
404402 int filter_provided_objects )
405403{
406404 uint32_t commit_count = 0 ,
@@ -436,7 +434,8 @@ static int try_bitmap_count(struct rev_info *revs,
436434 */
437435 max_count = revs -> max_count ;
438436
439- bitmap_git = prepare_bitmap_walk (revs , filter , filter_provided_objects );
437+ bitmap_git = prepare_bitmap_walk (revs , & revs -> filter ,
438+ filter_provided_objects );
440439 if (!bitmap_git )
441440 return -1 ;
442441
@@ -453,7 +452,6 @@ static int try_bitmap_count(struct rev_info *revs,
453452}
454453
455454static int try_bitmap_traversal (struct rev_info * revs ,
456- struct list_objects_filter_options * filter ,
457455 int filter_provided_objects )
458456{
459457 struct bitmap_index * bitmap_git ;
@@ -465,7 +463,8 @@ static int try_bitmap_traversal(struct rev_info *revs,
465463 if (revs -> max_count >= 0 )
466464 return -1 ;
467465
468- bitmap_git = prepare_bitmap_walk (revs , filter , filter_provided_objects );
466+ bitmap_git = prepare_bitmap_walk (revs , & revs -> filter ,
467+ filter_provided_objects );
469468 if (!bitmap_git )
470469 return -1 ;
471470
@@ -475,15 +474,14 @@ static int try_bitmap_traversal(struct rev_info *revs,
475474}
476475
477476static int try_bitmap_disk_usage (struct rev_info * revs ,
478- struct list_objects_filter_options * filter ,
479477 int filter_provided_objects )
480478{
481479 struct bitmap_index * bitmap_git ;
482480
483481 if (!show_disk_usage )
484482 return -1 ;
485483
486- bitmap_git = prepare_bitmap_walk (revs , filter , filter_provided_objects );
484+ bitmap_git = prepare_bitmap_walk (revs , & revs -> filter , filter_provided_objects );
487485 if (!bitmap_git )
488486 return -1 ;
489487
@@ -597,13 +595,13 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
597595 }
598596
599597 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 )
602600 die (_ ("object filtering requires --objects" ));
603601 continue ;
604602 }
605603 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 );
607605 continue ;
608606 }
609607 if (!strcmp (arg , "--filter-provided-objects" )) {
@@ -688,11 +686,11 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
688686 progress = start_delayed_progress (show_progress , 0 );
689687
690688 if (use_bitmap_index ) {
691- if (!try_bitmap_count (& revs , & filter_options , filter_provided_objects ))
689+ if (!try_bitmap_count (& revs , filter_provided_objects ))
692690 return 0 ;
693- if (!try_bitmap_disk_usage (& revs , & filter_options , filter_provided_objects ))
691+ if (!try_bitmap_disk_usage (& revs , filter_provided_objects ))
694692 return 0 ;
695- if (!try_bitmap_traversal (& revs , & filter_options , filter_provided_objects ))
693+ if (!try_bitmap_traversal (& revs , filter_provided_objects ))
696694 return 0 ;
697695 }
698696
@@ -733,7 +731,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
733731 oidset_init (& missing_objects , DEFAULT_OIDSET_SIZE );
734732
735733 traverse_commit_list_filtered (
736- & filter_options , & revs , show_commit , show_object , & info ,
734+ & revs . filter , & revs , show_commit , show_object , & info ,
737735 (arg_print_omitted ? & omitted_objects : NULL ));
738736
739737 if (arg_print_omitted ) {
0 commit comments