summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c8ba163)
raw | patch | inline | side by side (parent: c8ba163)
author | Jeff King <peff@peff.net> | |
Thu, 9 Jun 2011 15:55:59 +0000 (11:55 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 22 Jun 2011 18:25:20 +0000 (11:25 -0700) |
This saves us having our own callback function.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/remote.c | patch | blob | history |
diff --git a/builtin/remote.c b/builtin/remote.c
index 8424152269e309cb86e4ff530b9feacc23fc17a6..82cd59e303b51a58440211511bc757dd1599765c 100644 (file)
--- a/builtin/remote.c
+++ b/builtin/remote.c
return strcmp(string + len1 - len2, postfix);
}
-static int opt_parse_track(const struct option *opt, const char *arg, int not)
-{
- struct string_list *list = opt->value;
- if (not)
- string_list_clear(list, 0);
- else
- string_list_append(list, arg);
- return 0;
-}
-
static int fetch_remote(const char *name)
{
const char *argv[] = { "fetch", name, NULL, NULL };
TAGS_SET),
OPT_SET_INT(0, NULL, &fetch_tags,
"or do not fetch any tag at all (--no-tags)", TAGS_UNSET),
- OPT_CALLBACK('t', "track", &track, "branch",
- "branch(es) to track", opt_parse_track),
+ OPT_STRING_LIST('t', "track", &track, "branch",
+ "branch(es) to track"),
OPT_STRING('m', "master", &master, "branch", "master branch"),
{ OPTION_CALLBACK, 0, "mirror", &mirror, "push|fetch",
"set up remote as a mirror to push to or fetch from",