@@ -88,16 +88,6 @@ static inline int postfixcmp(const char *string, const char *postfix)
8888 return strcmp (string + len1 - len2 , postfix );
8989}
9090
91- static int opt_parse_track (const struct option * opt , const char * arg , int not )
92- {
93- struct string_list * list = opt -> value ;
94- if (not )
95- string_list_clear (list , 0 );
96- else
97- string_list_append (list , arg );
98- return 0 ;
99- }
100-
10191static int fetch_remote (const char * name )
10292{
10393 const char * argv [] = { "fetch" , name , NULL , NULL };
@@ -176,8 +166,8 @@ static int add(int argc, const char **argv)
176166 TAGS_SET ),
177167 OPT_SET_INT (0 , NULL , & fetch_tags ,
178168 "or do not fetch any tag at all (--no-tags)" , TAGS_UNSET ),
179- OPT_CALLBACK ('t' , "track" , & track , "branch" ,
180- "branch(es) to track" , opt_parse_track ),
169+ OPT_STRING_LIST ('t' , "track" , & track , "branch" ,
170+ "branch(es) to track" ),
181171 OPT_STRING ('m' , "master" , & master , "branch" , "master branch" ),
182172 { OPTION_CALLBACK , 0 , "mirror" , & mirror , "push|fetch" ,
183173 "set up remote as a mirror to push to or fetch from" ,
0 commit comments