@@ -134,7 +134,7 @@ static int add_branch(const char *key, const char *branchname,
134134static int add (int argc , const char * * argv )
135135{
136136 int fetch = 0 , mirror = 0 , fetch_tags = TAGS_DEFAULT ;
137- struct string_list track = { NULL , 0 , 0 } ;
137+ struct string_list track = STRING_LIST_INIT_NODUP ;
138138 const char * master = NULL ;
139139 struct remote * remote ;
140140 struct strbuf buf = STRBUF_INIT , buf2 = STRBUF_INIT ;
@@ -596,7 +596,7 @@ static int mv(int argc, const char **argv)
596596 };
597597 struct remote * oldremote , * newremote ;
598598 struct strbuf buf = STRBUF_INIT , buf2 = STRBUF_INIT , buf3 = STRBUF_INIT ;
599- struct string_list remote_branches = { NULL , 0 , 0 , 0 } ;
599+ struct string_list remote_branches = STRING_LIST_INIT_NODUP ;
600600 struct rename_info rename ;
601601 int i ;
602602
@@ -734,8 +734,8 @@ static int rm(int argc, const char **argv)
734734 struct remote * remote ;
735735 struct strbuf buf = STRBUF_INIT ;
736736 struct known_remotes known_remotes = { NULL , NULL };
737- struct string_list branches = { NULL , 0 , 0 , 1 } ;
738- struct string_list skipped = { NULL , 0 , 0 , 1 } ;
737+ struct string_list branches = STRING_LIST_INIT_DUP ;
738+ struct string_list skipped = STRING_LIST_INIT_DUP ;
739739 struct branches_for_remote cb_data ;
740740 int i , result ;
741741
@@ -1044,7 +1044,7 @@ static int show(int argc, const char **argv)
10441044 OPT_END ()
10451045 };
10461046 struct ref_states states ;
1047- struct string_list info_list = { NULL , 0 , 0 , 0 } ;
1047+ struct string_list info_list = STRING_LIST_INIT_NODUP ;
10481048 struct show_info info ;
10491049
10501050 argc = parse_options (argc , argv , NULL , options , builtin_remote_show_usage ,
@@ -1483,7 +1483,7 @@ static int get_one_entry(struct remote *remote, void *priv)
14831483
14841484static int show_all (void )
14851485{
1486- struct string_list list = { NULL , 0 , 0 } ;
1486+ struct string_list list = STRING_LIST_INIT_NODUP ;
14871487 int result ;
14881488
14891489 list .strdup_strings = 1 ;
0 commit comments