{"thread":{"id":"49163","subject":"[PATCH] parseopt: group literal string alternatives in argument help","startedAt":"2018-08-19T17:34:57Z","lastAt":"2018-08-19T17:34:57Z","messageCount":1,"participants":["René Scharfe"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"356036","messageId":"0635e9e0-41ac-95b5-257c-d572f5cdb2cd@web.de","threadId":"49163","inReplyTo":null,"subject":"[PATCH] parseopt: group literal string alternatives in argument help","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2018-08-19T17:34:48Z","receivedAt":"2018-08-19T17:34:57Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"This formally clarifies that the \"--option=\" part is the same for all\nalternatives.\n\nSigned-off-by: Rene Scharfe <l.s.r@web.de>\n---\n builtin/pull.c      | 2 +-\n builtin/push.c      | 4 ++--\n builtin/send-pack.c | 2 +-\n 3 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/builtin/pull.c b/builtin/pull.c\nindex 53bc5facfd..681c127a07 100644\n--- a/builtin/pull.c\n+++ b/builtin/pull.c\n@@ -135,7 +135,7 @@ static struct option pull_options[] = {\n \t/* Options passed to git-merge or git-rebase */\n \tOPT_GROUP(N_(\"Options related to merging\")),\n \t{ OPTION_CALLBACK, 'r', \"rebase\", &opt_rebase,\n-\t  \"false|true|merges|preserve|interactive\",\n+\t  \"(false|true|merges|preserve|interactive)\",\n \t  N_(\"incorporate changes by rebasing rather than merging\"),\n \t  PARSE_OPT_OPTARG, parse_opt_rebase },\n \tOPT_PASSTHRU('n', NULL, &opt_diffstat, NULL,\ndiff --git a/builtin/push.c b/builtin/push.c\nindex ef4c188895..d09a42062c 100644\n--- a/builtin/push.c\n+++ b/builtin/push.c\n@@ -561,7 +561,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)\n \t\t  0, CAS_OPT_NAME, &cas, N_(\"<refname>:<expect>\"),\n \t\t  N_(\"require old value of ref to be at this value\"),\n \t\t  PARSE_OPT_OPTARG | PARSE_OPT_LITERAL_ARGHELP, parseopt_push_cas_option },\n-\t\t{ OPTION_CALLBACK, 0, \"recurse-submodules\", &recurse_submodules, \"check|on-demand|no\",\n+\t\t{ OPTION_CALLBACK, 0, \"recurse-submodules\", &recurse_submodules, \"(check|on-demand|no)\",\n \t\t\tN_(\"control recursive pushing of submodules\"),\n \t\t\tPARSE_OPT_OPTARG, option_parse_recurse_submodules },\n \t\tOPT_BOOL_F( 0 , \"thin\", &thin, N_(\"use thin pack\"), PARSE_OPT_NOCOMPLETE),\n@@ -576,7 +576,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)\n \t\tOPT_BIT(0, \"follow-tags\", &flags, N_(\"push missing but relevant tags\"),\n \t\t\tTRANSPORT_PUSH_FOLLOW_TAGS),\n \t\t{ OPTION_CALLBACK,\n-\t\t  0, \"signed\", &push_cert, \"yes|no|if-asked\", N_(\"GPG sign the push\"),\n+\t\t  0, \"signed\", &push_cert, \"(yes|no|if-asked)\", N_(\"GPG sign the push\"),\n \t\t  PARSE_OPT_OPTARG, option_parse_push_signed },\n \t\tOPT_BIT(0, \"atomic\", &flags, N_(\"request atomic transaction on remote side\"), TRANSPORT_PUSH_ATOMIC),\n \t\tOPT_STRING_LIST('o', \"push-option\", &push_options_cmdline, N_(\"server-specific\"), N_(\"option to transmit\")),\ndiff --git a/builtin/send-pack.c b/builtin/send-pack.c\nindex 724b484850..8e3c7490f7 100644\n--- a/builtin/send-pack.c\n+++ b/builtin/send-pack.c\n@@ -166,7 +166,7 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)\n \t\tOPT_BOOL(0, \"mirror\", &send_mirror, N_(\"mirror all refs\")),\n \t\tOPT_BOOL('f', \"force\", &force_update, N_(\"force updates\")),\n \t\t{ OPTION_CALLBACK,\n-\t\t  0, \"signed\", &push_cert, \"yes|no|if-asked\", N_(\"GPG sign the push\"),\n+\t\t  0, \"signed\", &push_cert, \"(yes|no|if-asked)\", N_(\"GPG sign the push\"),\n \t\t  PARSE_OPT_OPTARG, option_parse_push_signed },\n \t\tOPT_STRING_LIST(0, \"push-option\", &push_options,\n \t\t\t\tN_(\"server-specific\"),\n-- \n2.18.0\n"}]}