Skip to content

Commit bbc072f

Browse files
rscharfegitster
authored andcommitted
parseopt: group literal string alternatives in argument help
This formally clarifies that the "--option=" part is the same for all alternatives. Signed-off-by: Rene Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 446e63c commit bbc072f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

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, 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/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)