diff options
author | Stefan Beller <stefanbeller@googlemail.com> | 2013-08-03 13:51:19 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-08-05 11:32:19 -0700 |
commit | d5d09d475440c24016ec52a0bcc8477d9a7b5c71 (patch) | |
tree | a6758a688f3308d4dc4ff75885fe7ce8792c9921 /builtin/remote.c | |
parent | Remove deprecated OPTION_BOOLEAN for parsing arguments (diff) | |
download | tgif-d5d09d475440c24016ec52a0bcc8477d9a7b5c71.tar.xz |
Replace deprecated OPT_BOOLEAN by OPT_BOOL
This task emerged from b04ba2bb (parse-options: deprecate OPT_BOOLEAN,
2011-09-27). All occurrences of the respective variables have
been reviewed and none of them relied on the counting up mechanism,
but all of them were using the variable as a true boolean.
This patch does not change semantics of any command intentionally.
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/remote.c')
-rw-r--r-- | builtin/remote.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/builtin/remote.c b/builtin/remote.c index 5e54d367b8..eaac3e2012 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -160,7 +160,7 @@ static int add(int argc, const char **argv) int i; struct option options[] = { - OPT_BOOLEAN('f', "fetch", &fetch, N_("fetch the remote branches")), + OPT_BOOL('f', "fetch", &fetch, N_("fetch the remote branches")), OPT_SET_INT(0, "tags", &fetch_tags, N_("import all tags and associated objects when fetching"), TAGS_SET), @@ -1088,7 +1088,7 @@ static int show(int argc, const char **argv) { int no_query = 0, result = 0, query_flag = 0; struct option options[] = { - OPT_BOOLEAN('n', NULL, &no_query, N_("do not query remotes")), + OPT_BOOL('n', NULL, &no_query, N_("do not query remotes")), OPT_END() }; struct ref_states states; @@ -1195,10 +1195,10 @@ static int set_head(int argc, const char **argv) char *head_name = NULL; struct option options[] = { - OPT_BOOLEAN('a', "auto", &opt_a, - N_("set refs/remotes/<name>/HEAD according to remote")), - OPT_BOOLEAN('d', "delete", &opt_d, - N_("delete refs/remotes/<name>/HEAD")), + OPT_BOOL('a', "auto", &opt_a, + N_("set refs/remotes/<name>/HEAD according to remote")), + OPT_BOOL('d', "delete", &opt_d, + N_("delete refs/remotes/<name>/HEAD")), OPT_END() }; argc = parse_options(argc, argv, NULL, options, builtin_remote_sethead_usage, @@ -1317,8 +1317,8 @@ static int update(int argc, const char **argv) { int i, prune = 0; struct option options[] = { - OPT_BOOLEAN('p', "prune", &prune, - N_("prune remotes after fetching")), + OPT_BOOL('p', "prune", &prune, + N_("prune remotes after fetching")), OPT_END() }; const char **fetch_argv; @@ -1404,7 +1404,7 @@ static int set_branches(int argc, const char **argv) { int add_mode = 0; struct option options[] = { - OPT_BOOLEAN('\0', "add", &add_mode, N_("add branch")), + OPT_BOOL('\0', "add", &add_mode, N_("add branch")), OPT_END() }; @@ -1432,11 +1432,11 @@ static int set_url(int argc, const char **argv) int urlset_nr; struct strbuf name_buf = STRBUF_INIT; struct option options[] = { - OPT_BOOLEAN('\0', "push", &push_mode, - N_("manipulate push URLs")), - OPT_BOOLEAN('\0', "add", &add_mode, - N_("add URL")), - OPT_BOOLEAN('\0', "delete", &delete_mode, + OPT_BOOL('\0', "push", &push_mode, + N_("manipulate push URLs")), + OPT_BOOL('\0', "add", &add_mode, + N_("add URL")), + OPT_BOOL('\0', "delete", &delete_mode, N_("delete URLs")), OPT_END() }; |