diff options
author | Thiago Farina <tfransosi@gmail.com> | 2010-07-04 16:46:19 -0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-07-05 11:47:57 -0700 |
commit | 183113a5ca99cb228b2ba0a29e53f1ac11f2c7c2 (patch) | |
tree | 2ab3a6f27ab3e8857cf3b5a825435f7bf6ed5b72 /builtin/remote.c | |
parent | 8a57c6e9437eeebf849f0def03389078a510312e (diff) | |
download | git-183113a5ca99cb228b2ba0a29e53f1ac11f2c7c2.tar.gz |
string_list: Add STRING_LIST_INIT macro and make use of it.
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/remote.c')
-rw-r--r-- | builtin/remote.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/builtin/remote.c b/builtin/remote.c index 6699bc5712..48e0a6bf26 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -134,7 +134,7 @@ static int add_branch(const char *key, const char *branchname, static int add(int argc, const char **argv) { int fetch = 0, mirror = 0, fetch_tags = TAGS_DEFAULT; - struct string_list track = { NULL, 0, 0 }; + struct string_list track = STRING_LIST_INIT_NODUP; const char *master = NULL; struct remote *remote; struct strbuf buf = STRBUF_INIT, buf2 = STRBUF_INIT; @@ -596,7 +596,7 @@ static int mv(int argc, const char **argv) }; struct remote *oldremote, *newremote; struct strbuf buf = STRBUF_INIT, buf2 = STRBUF_INIT, buf3 = STRBUF_INIT; - struct string_list remote_branches = { NULL, 0, 0, 0 }; + struct string_list remote_branches = STRING_LIST_INIT_NODUP; struct rename_info rename; int i; @@ -734,8 +734,8 @@ static int rm(int argc, const char **argv) struct remote *remote; struct strbuf buf = STRBUF_INIT; struct known_remotes known_remotes = { NULL, NULL }; - struct string_list branches = { NULL, 0, 0, 1 }; - struct string_list skipped = { NULL, 0, 0, 1 }; + struct string_list branches = STRING_LIST_INIT_DUP; + struct string_list skipped = STRING_LIST_INIT_DUP; struct branches_for_remote cb_data; int i, result; @@ -1044,7 +1044,7 @@ static int show(int argc, const char **argv) OPT_END() }; struct ref_states states; - struct string_list info_list = { NULL, 0, 0, 0 }; + struct string_list info_list = STRING_LIST_INIT_NODUP; struct show_info info; 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) static int show_all(void) { - struct string_list list = { NULL, 0, 0 }; + struct string_list list = STRING_LIST_INIT_NODUP; int result; list.strdup_strings = 1; |