Merge branch 'rs/opt-updates'
authorJunio C Hamano <gitster@pobox.com>
Mon, 27 Aug 2018 21:33:43 +0000 (14:33 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Aug 2018 21:33:43 +0000 (14:33 -0700)
"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

builtin/checkout-index.c
builtin/pull.c
builtin/push.c
builtin/remote.c
builtin/send-pack.c
index d92db62fbdf15c14ff3d85b767a069b22aa3897d..88b86c8d9f5a0ea9c49b42e891082203b80a977f 100644 (file)
@@ -172,7 +172,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
                        N_("write the content to temporary files")),
                OPT_STRING(0, "prefix", &state.base_dir, N_("string"),
                        N_("when creating files, prepend <string>")),
-               { OPTION_CALLBACK, 0, "stage", NULL, "1-3|all",
+               { OPTION_CALLBACK, 0, "stage", NULL, "(1|2|3|all)",
                        N_("copy out the files from named stage"),
                        PARSE_OPT_NONEG, option_parse_stage },
                OPT_END()
index 53bc5facfdabd05934a351091f2040744b2575ca..681c127a07071c98641972227a28dbe7f77eaf70 100644 (file)
@@ -135,7 +135,7 @@ static struct option pull_options[] = {
        /* Options passed to git-merge or git-rebase */
        OPT_GROUP(N_("Options related to merging")),
        { OPTION_CALLBACK, 'r', "rebase", &opt_rebase,
-         "false|true|merges|preserve|interactive",
+         "(false|true|merges|preserve|interactive)",
          N_("incorporate changes by rebasing rather than merging"),
          PARSE_OPT_OPTARG, parse_opt_rebase },
        OPT_PASSTHRU('n', NULL, &opt_diffstat, NULL,
index ef4c188895beab317a66523b23a9f1c87e634405..d09a42062c36d930b8147d6b0a4bcfedf34a2321 100644 (file)
@@ -561,7 +561,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
                  0, CAS_OPT_NAME, &cas, N_("<refname>:<expect>"),
                  N_("require old value of ref to be at this value"),
                  PARSE_OPT_OPTARG | PARSE_OPT_LITERAL_ARGHELP, parseopt_push_cas_option },
-               { OPTION_CALLBACK, 0, "recurse-submodules", &recurse_submodules, "check|on-demand|no",
+               { OPTION_CALLBACK, 0, "recurse-submodules", &recurse_submodules, "(check|on-demand|no)",
                        N_("control recursive pushing of submodules"),
                        PARSE_OPT_OPTARG, option_parse_recurse_submodules },
                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)
                OPT_BIT(0, "follow-tags", &flags, N_("push missing but relevant tags"),
                        TRANSPORT_PUSH_FOLLOW_TAGS),
                { OPTION_CALLBACK,
-                 0, "signed", &push_cert, "yes|no|if-asked", N_("GPG sign the push"),
+                 0, "signed", &push_cert, "(yes|no|if-asked)", N_("GPG sign the push"),
                  PARSE_OPT_OPTARG, option_parse_push_signed },
                OPT_BIT(0, "atomic", &flags, N_("request atomic transaction on remote side"), TRANSPORT_PUSH_ATOMIC),
                OPT_STRING_LIST('o', "push-option", &push_options_cmdline, N_("server-specific"), N_("option to transmit")),
index 07bd51f8eb348036e7e1446d513e46e2877ec6a9..7876db1c20d317e28e4a84880197c6a690bf9ef6 100644 (file)
@@ -168,7 +168,7 @@ static int add(int argc, const char **argv)
                OPT_STRING_LIST('t', "track", &track, N_("branch"),
                                N_("branch(es) to track")),
                OPT_STRING('m', "master", &master, N_("branch"), N_("master branch")),
-               { OPTION_CALLBACK, 0, "mirror", &mirror, N_("push|fetch"),
+               { OPTION_CALLBACK, 0, "mirror", &mirror, "(push|fetch)",
                        N_("set up remote as a mirror to push to or fetch from"),
                        PARSE_OPT_OPTARG | PARSE_OPT_COMP_ARG, parse_mirror_opt },
                OPT_END()
index 724b4848508d67b3693edf458033e7e29a92b3d3..8e3c7490f70df79497ee064ab13c0164de11fe9e 100644 (file)
@@ -166,7 +166,7 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
                OPT_BOOL(0, "mirror", &send_mirror, N_("mirror all refs")),
                OPT_BOOL('f', "force", &force_update, N_("force updates")),
                { OPTION_CALLBACK,
-                 0, "signed", &push_cert, "yes|no|if-asked", N_("GPG sign the push"),
+                 0, "signed", &push_cert, "(yes|no|if-asked)", N_("GPG sign the push"),
                  PARSE_OPT_OPTARG, option_parse_push_signed },
                OPT_STRING_LIST(0, "push-option", &push_options,
                                N_("server-specific"),