@@ -3714,20 +3714,19 @@ static void mark_bitmap_preferred_tips(void)
3714
3714
}
3715
3715
}
3716
3716
3717
- static void get_object_list (int ac , const char * * av )
3717
+ static void get_object_list (struct rev_info * revs , int ac , const char * * av )
3718
3718
{
3719
- struct rev_info revs ;
3720
3719
struct setup_revision_opt s_r_opt = {
3721
3720
.allow_exclude_promisor_objects = 1 ,
3722
3721
};
3723
3722
char line [1000 ];
3724
3723
int flags = 0 ;
3725
3724
int save_warning ;
3726
3725
3727
- repo_init_revisions (the_repository , & revs , NULL );
3726
+ repo_init_revisions (the_repository , revs , NULL );
3728
3727
save_commit_buffer = 0 ;
3729
- setup_revisions (ac , av , & revs , & s_r_opt );
3730
- list_objects_filter_copy (& revs . filter , & filter_options );
3728
+ setup_revisions (ac , av , revs , & s_r_opt );
3729
+ list_objects_filter_copy (& revs -> filter , & filter_options );
3731
3730
3732
3731
/* make sure shallows are read */
3733
3732
is_repository_shallow (the_repository );
@@ -3757,13 +3756,13 @@ static void get_object_list(int ac, const char **av)
3757
3756
}
3758
3757
die (_ ("not a rev '%s'" ), line );
3759
3758
}
3760
- if (handle_revision_arg (line , & revs , flags , REVARG_CANNOT_BE_FILENAME ))
3759
+ if (handle_revision_arg (line , revs , flags , REVARG_CANNOT_BE_FILENAME ))
3761
3760
die (_ ("bad revision '%s'" ), line );
3762
3761
}
3763
3762
3764
3763
warn_on_object_refname_ambiguity = save_warning ;
3765
3764
3766
- if (use_bitmap_index && !get_object_list_from_bitmap (& revs ))
3765
+ if (use_bitmap_index && !get_object_list_from_bitmap (revs ))
3767
3766
return ;
3768
3767
3769
3768
if (use_delta_islands )
@@ -3772,24 +3771,24 @@ static void get_object_list(int ac, const char **av)
3772
3771
if (write_bitmap_index )
3773
3772
mark_bitmap_preferred_tips ();
3774
3773
3775
- if (prepare_revision_walk (& revs ))
3774
+ if (prepare_revision_walk (revs ))
3776
3775
die (_ ("revision walk setup failed" ));
3777
- mark_edges_uninteresting (& revs , show_edge , sparse );
3776
+ mark_edges_uninteresting (revs , show_edge , sparse );
3778
3777
3779
3778
if (!fn_show_object )
3780
3779
fn_show_object = show_object ;
3781
- traverse_commit_list (& revs ,
3780
+ traverse_commit_list (revs ,
3782
3781
show_commit , fn_show_object ,
3783
3782
NULL );
3784
3783
3785
3784
if (unpack_unreachable_expiration ) {
3786
- revs . ignore_missing_links = 1 ;
3787
- if (add_unseen_recent_objects_to_traversal (& revs ,
3785
+ revs -> ignore_missing_links = 1 ;
3786
+ if (add_unseen_recent_objects_to_traversal (revs ,
3788
3787
unpack_unreachable_expiration ))
3789
3788
die (_ ("unable to add recent objects" ));
3790
- if (prepare_revision_walk (& revs ))
3789
+ if (prepare_revision_walk (revs ))
3791
3790
die (_ ("revision walk setup failed" ));
3792
- traverse_commit_list (& revs , record_recent_commit ,
3791
+ traverse_commit_list (revs , record_recent_commit ,
3793
3792
record_recent_object , NULL );
3794
3793
}
3795
3794
@@ -3872,6 +3871,8 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
3872
3871
int rev_list_index = 0 ;
3873
3872
int stdin_packs = 0 ;
3874
3873
struct string_list keep_pack_list = STRING_LIST_INIT_NODUP ;
3874
+ struct rev_info revs ;
3875
+
3875
3876
struct option pack_objects_options [] = {
3876
3877
OPT_SET_INT ('q' , "quiet" , & progress ,
3877
3878
N_ ("do not show progress meter" ), 0 ),
@@ -3976,6 +3977,8 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
3976
3977
3977
3978
read_replace_refs = 0 ;
3978
3979
3980
+ repo_init_revisions (the_repository , & revs , NULL );
3981
+
3979
3982
sparse = git_env_bool ("GIT_TEST_PACK_SPARSE" , -1 );
3980
3983
if (the_repository -> gitdir ) {
3981
3984
prepare_repo_settings (the_repository );
@@ -4154,7 +4157,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
4154
4157
} else if (!use_internal_rev_list ) {
4155
4158
read_object_list_from_stdin ();
4156
4159
} else {
4157
- get_object_list (rp .nr , rp .v );
4160
+ get_object_list (& revs , rp .nr , rp .v );
4158
4161
}
4159
4162
cleanup_preferred_base ();
4160
4163
if (include_tag && nr_result )
0 commit comments