Skip to content

Commit fc0df93

Browse files
committed
Merge branch 'rs/opt-updates'
"git cmd -h" updates. * rs/opt-updates: parseopt: group literal string alternatives in argument help remote: improve argument help for add --mirror checkout-index: improve argument help for --stage
2 parents 6e96e88 + bbc072f commit fc0df93

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

builtin/checkout-index.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
172172
N_("write the content to temporary files")),
173173
OPT_STRING(0, "prefix", &state.base_dir, N_("string"),
174174
N_("when creating files, prepend <string>")),
175-
{ OPTION_CALLBACK, 0, "stage", NULL, "1-3|all",
175+
{ OPTION_CALLBACK, 0, "stage", NULL, "(1|2|3|all)",
176176
N_("copy out the files from named stage"),
177177
PARSE_OPT_NONEG, option_parse_stage },
178178
OPT_END()

builtin/pull.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ static struct option pull_options[] = {
135135
/* Options passed to git-merge or git-rebase */
136136
OPT_GROUP(N_("Options related to merging")),
137137
{ OPTION_CALLBACK, 'r', "rebase", &opt_rebase,
138-
"false|true|merges|preserve|interactive",
138+
"(false|true|merges|preserve|interactive)",
139139
N_("incorporate changes by rebasing rather than merging"),
140140
PARSE_OPT_OPTARG, parse_opt_rebase },
141141
OPT_PASSTHRU('n', NULL, &opt_diffstat, NULL,

builtin/push.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
561561
0, CAS_OPT_NAME, &cas, N_("<refname>:<expect>"),
562562
N_("require old value of ref to be at this value"),
563563
PARSE_OPT_OPTARG | PARSE_OPT_LITERAL_ARGHELP, parseopt_push_cas_option },
564-
{ OPTION_CALLBACK, 0, "recurse-submodules", &recurse_submodules, "check|on-demand|no",
564+
{ OPTION_CALLBACK, 0, "recurse-submodules", &recurse_submodules, "(check|on-demand|no)",
565565
N_("control recursive pushing of submodules"),
566566
PARSE_OPT_OPTARG, option_parse_recurse_submodules },
567567
OPT_BOOL_F( 0 , "thin", &thin, N_("use thin pack"), PARSE_OPT_NOCOMPLETE),
@@ -576,7 +576,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
576576
OPT_BIT(0, "follow-tags", &flags, N_("push missing but relevant tags"),
577577
TRANSPORT_PUSH_FOLLOW_TAGS),
578578
{ OPTION_CALLBACK,
579-
0, "signed", &push_cert, "yes|no|if-asked", N_("GPG sign the push"),
579+
0, "signed", &push_cert, "(yes|no|if-asked)", N_("GPG sign the push"),
580580
PARSE_OPT_OPTARG, option_parse_push_signed },
581581
OPT_BIT(0, "atomic", &flags, N_("request atomic transaction on remote side"), TRANSPORT_PUSH_ATOMIC),
582582
OPT_STRING_LIST('o', "push-option", &push_options_cmdline, N_("server-specific"), N_("option to transmit")),

builtin/remote.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ static int add(int argc, const char **argv)
168168
OPT_STRING_LIST('t', "track", &track, N_("branch"),
169169
N_("branch(es) to track")),
170170
OPT_STRING('m', "master", &master, N_("branch"), N_("master branch")),
171-
{ OPTION_CALLBACK, 0, "mirror", &mirror, N_("push|fetch"),
171+
{ OPTION_CALLBACK, 0, "mirror", &mirror, "(push|fetch)",
172172
N_("set up remote as a mirror to push to or fetch from"),
173173
PARSE_OPT_OPTARG | PARSE_OPT_COMP_ARG, parse_mirror_opt },
174174
OPT_END()

builtin/send-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
166166
OPT_BOOL(0, "mirror", &send_mirror, N_("mirror all refs")),
167167
OPT_BOOL('f', "force", &force_update, N_("force updates")),
168168
{ OPTION_CALLBACK,
169-
0, "signed", &push_cert, "yes|no|if-asked", N_("GPG sign the push"),
169+
0, "signed", &push_cert, "(yes|no|if-asked)", N_("GPG sign the push"),
170170
PARSE_OPT_OPTARG, option_parse_push_signed },
171171
OPT_STRING_LIST(0, "push-option", &push_options,
172172
N_("server-specific"),

0 commit comments

Comments
 (0)