@@ -30,6 +30,7 @@ static int fake_missing_tagger;
30
30
static int use_done_feature ;
31
31
static int no_data ;
32
32
static int full_tree ;
33
+ static struct string_list extra_refs = STRING_LIST_INIT_NODUP ;
33
34
34
35
static int parse_opt_signed_tag_mode (const struct option * opt ,
35
36
const char * arg , int unset )
@@ -484,8 +485,7 @@ static void handle_tag(const char *name, struct tag *tag)
484
485
(int )message_size , (int )message_size , message ? message : "" );
485
486
}
486
487
487
- static void get_tags_and_duplicates (struct rev_cmdline_info * info ,
488
- struct string_list * extra_refs )
488
+ static void get_tags_and_duplicates (struct rev_cmdline_info * info )
489
489
{
490
490
struct tag * tag ;
491
491
int i ;
@@ -512,7 +512,7 @@ static void get_tags_and_duplicates(struct rev_cmdline_info *info,
512
512
/* handle nested tags */
513
513
while (tag && tag -> object .type == OBJ_TAG ) {
514
514
parse_object (tag -> object .sha1 );
515
- string_list_append (extra_refs , full_name )-> util = tag ;
515
+ string_list_append (& extra_refs , full_name )-> util = tag ;
516
516
tag = (struct tag * )tag -> tagged ;
517
517
}
518
518
if (!tag )
@@ -542,20 +542,20 @@ static void get_tags_and_duplicates(struct rev_cmdline_info *info,
542
542
* sure it gets properly updated eventually.
543
543
*/
544
544
if (commit -> util || commit -> object .flags & SHOWN )
545
- string_list_append (extra_refs , full_name )-> util = commit ;
545
+ string_list_append (& extra_refs , full_name )-> util = commit ;
546
546
if (!commit -> util )
547
547
commit -> util = full_name ;
548
548
}
549
549
}
550
550
551
- static void handle_tags_and_duplicates (struct string_list * extra_refs )
551
+ static void handle_tags_and_duplicates (void )
552
552
{
553
553
struct commit * commit ;
554
554
int i ;
555
555
556
- for (i = extra_refs -> nr - 1 ; i >= 0 ; i -- ) {
557
- const char * name = extra_refs -> items [i ].string ;
558
- struct object * object = extra_refs -> items [i ].util ;
556
+ for (i = extra_refs . nr - 1 ; i >= 0 ; i -- ) {
557
+ const char * name = extra_refs . items [i ].string ;
558
+ struct object * object = extra_refs . items [i ].util ;
559
559
switch (object -> type ) {
560
560
case OBJ_TAG :
561
561
handle_tag (name , (struct tag * )object );
@@ -657,7 +657,6 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
657
657
{
658
658
struct rev_info revs ;
659
659
struct object_array commits = OBJECT_ARRAY_INIT ;
660
- struct string_list extra_refs = STRING_LIST_INIT_NODUP ;
661
660
struct commit * commit ;
662
661
char * export_filename = NULL , * import_filename = NULL ;
663
662
uint32_t lastimportid ;
@@ -709,7 +708,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
709
708
if (import_filename && revs .prune_data .nr )
710
709
full_tree = 1 ;
711
710
712
- get_tags_and_duplicates (& revs .cmdline , & extra_refs );
711
+ get_tags_and_duplicates (& revs .cmdline );
713
712
714
713
if (prepare_revision_walk (& revs ))
715
714
die ("revision walk setup failed" );
@@ -725,7 +724,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
725
724
}
726
725
}
727
726
728
- handle_tags_and_duplicates (& extra_refs );
727
+ handle_tags_and_duplicates ();
729
728
730
729
if (export_filename && lastimportid != last_idnum )
731
730
export_marks (export_filename );
0 commit comments