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 <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

René Scharfe committed Aug 19, 2018 at 19:34 UTC bbc072f5d884d17a6102fd04ae6d2cfcaa98ad48
3 files changed +4 -4
builtin/pull.c
+1 -1
@@ -135,7 +135,7 @@ static struct option pull_options[] = {
135 /* Options passed to git-merge or git-rebase */
136 OPT_GROUP(N_("Options related to merging")),
137 { OPTION_CALLBACK, 'r', "rebase", &opt_rebase,
138 - "false|true|merges|preserve|interactive",
138 + "(false|true|merges|preserve|interactive)",
139 N_("incorporate changes by rebasing rather than merging"),
140 PARSE_OPT_OPTARG, parse_opt_rebase },
141 OPT_PASSTHRU('n', NULL, &opt_diffstat, NULL,
builtin/push.c
+2 -2
@@ -561,7 +561,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
561 0, CAS_OPT_NAME, &cas, N_("refname>:<expect"),
562 N_("require old value of ref to be at this value"),
563 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)",
565 N_("control recursive pushing of submodules"),
566 PARSE_OPT_OPTARG, option_parse_recurse_submodules },
567 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)
576 OPT_BIT(0, "follow-tags", &flags, N_("push missing but relevant tags"),
577 TRANSPORT_PUSH_FOLLOW_TAGS),
578 { 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"),
580 PARSE_OPT_OPTARG, option_parse_push_signed },
581 OPT_BIT(0, "atomic", &flags, N_("request atomic transaction on remote side"), TRANSPORT_PUSH_ATOMIC),
582 OPT_STRING_LIST('o', "push-option", &push_options_cmdline, N_("server-specific"), N_("option to transmit")),
builtin/send-pack.c
+1 -1
@@ -166,7 +166,7 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
166 OPT_BOOL(0, "mirror", &send_mirror, N_("mirror all refs")),
167 OPT_BOOL('f', "force", &force_update, N_("force updates")),
168 { 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"),
170 PARSE_OPT_OPTARG, option_parse_push_signed },
171 OPT_STRING_LIST(0, "push-option", &push_options,
172 N_("server-specific"),