]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc txt & -h consistency: add missing options and labels
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 13 Oct 2022 15:39:13 +0000 (17:39 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Oct 2022 16:32:56 +0000 (09:32 -0700)
Fix various issues of SYNOPSIS and -h output syntax where:

 * Options such as --force were missing entirely
 * ...or the short option, such as -f

 * We said "opts" or "options", but could instead enumerate
   the (small) set of supported options

 * Options that were missing entirely (ls-remote's --sort=<key>)

   As we can specify "--sort" multiple times (it's backed by a
   string-list" it should really be "[(--sort=<key>)...]", which is
   what "git for-each-ref" lists it as, but let's leave that issue for
   a subsequent cleanup, and stop at making these consistent. Other
   "ref-filter.h" users share the same issue, e.g. "git-branch.txt".

 * For "verify-tag" and "verify-commit" we were missing the "--raw"
   option.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
19 files changed:
Documentation/git-send-pack.txt
Documentation/git-sparse-checkout.txt
Documentation/git-update-server-info.txt
Documentation/git-verify-commit.txt
Documentation/git-verify-tag.txt
builtin/credential-cache--daemon.c
builtin/describe.c
builtin/diff-index.c
builtin/ls-remote.c
builtin/pack-refs.c
builtin/revert.c
builtin/send-pack.c
builtin/symbolic-ref.c
builtin/tag.c
builtin/update-server-info.c
builtin/upload-pack.c
builtin/verify-commit.c
builtin/verify-tag.c
help.c

index e0c71623432bc2ccb0ce7ae8ec05ae25196526cd..595b002152fda5dbdedbc65d7feda8d0c4f9ec20 100644 (file)
@@ -9,7 +9,8 @@ git-send-pack - Push objects over Git protocol to another repository
 SYNOPSIS
 --------
 [verse]
-'git send-pack' [--dry-run] [--force] [--receive-pack=<git-receive-pack>]
+'git send-pack' [--mirror] [--dry-run] [--force]
+               [--receive-pack=<git-receive-pack>]
                [--verbose] [--thin] [--atomic]
                [--[no-]signed | --signed=(true|false|if-asked)]
                [<host>:]<directory> (--all | <ref>...)
index 872436d74261af2d775ad2f7f08c026ea12fea18..68392d2a56ed045a914b1d712f694929a1842242 100644 (file)
@@ -9,7 +9,7 @@ git-sparse-checkout - Reduce your working tree to a subset of tracked files
 SYNOPSIS
 --------
 [verse]
-'git sparse-checkout' <subcommand> [<options>]
+'git sparse-checkout' (init | list | set | add | reapply | disable) [<options>]
 
 
 DESCRIPTION
index 969bb2e15f1070ddc116b408b1eba9c61d496606..17e429dbd095605835bdf6b67d96bd8a92559cac 100644 (file)
@@ -9,7 +9,7 @@ git-update-server-info - Update auxiliary info file to help dumb servers
 SYNOPSIS
 --------
 [verse]
-'git update-server-info'
+'git update-server-info' [-f | --force]
 
 DESCRIPTION
 -----------
@@ -19,6 +19,12 @@ $GIT_OBJECT_DIRECTORY/info directories to help clients discover
 what references and packs the server has.  This command
 generates such auxiliary files.
 
+OPTIONS
+-------
+-f::
+--force::
+       update the info files from scratch.
+
 OUTPUT
 ------
 
index 92097f6673d8e72229b42c33227353ad5226f17e..aee4c40eac4666ebacb4cc2fd67e99b8d7e2fbfb 100644 (file)
@@ -8,7 +8,7 @@ git-verify-commit - Check the GPG signature of commits
 SYNOPSIS
 --------
 [verse]
-'git verify-commit' <commit>...
+'git verify-commit' [-v | --verbose] [--raw] <commit>...
 
 DESCRIPTION
 -----------
index 0b8075dad965f58b159bbe45f18d94bcc9f5ae60..81d50ecc4c6879ac486ab110038a41acd422717e 100644 (file)
@@ -8,7 +8,7 @@ git-verify-tag - Check the GPG signature of tags
 SYNOPSIS
 --------
 [verse]
-'git verify-tag' [--format=<format>] <tag>...
+'git verify-tag' [-v | --verbose] [--format=<format>] [--raw] <tag>...
 
 DESCRIPTION
 -----------
index ca672a6a61965918db26d6be206e8188623de457..d4eb0097d24d0a4c69592ea52db74baa4885a044 100644 (file)
@@ -267,7 +267,7 @@ int cmd_credential_cache_daemon(int argc, const char **argv, const char *prefix)
        const char *socket_path;
        int ignore_sighup = 0;
        static const char *usage[] = {
-               "git-credential-cache--daemon [opts] <socket-path>",
+               "git-credential-cache--daemon [--debug] <socket-path>",
                NULL
        };
        int debug = 0;
index a76f1a1a7a7004cc95f392024cc1a27d54c870df..98fb8afc3fa98965e3b2047cb0c47d7a272b39ca 100644 (file)
@@ -23,8 +23,9 @@
 define_commit_slab(commit_names, struct commit_name *);
 
 static const char * const describe_usage[] = {
-       N_("git describe [<options>] [<commit-ish>...]"),
-       N_("git describe [<options>] --dirty"),
+       N_("git describe [--all] [--tags] [--contains] [--abbrev=<n>] [<commit-ish>...]"),
+       N_("git describe [--all] [--tags] [--contains] [--abbrev=<n>] --dirty[=<mark>]"),
+       N_("git describe <blob>"),
        NULL
 };
 
index e667cf52e7d0962bb633f8c3c3ede10008051851..aea139b9d8f9ed2085cb91a4ea4dec853f9e8acc 100644 (file)
@@ -9,7 +9,7 @@
 #include "submodule.h"
 
 static const char diff_cache_usage[] =
-"git diff-index [-m] [--cached] "
+"git diff-index [-m] [--cached] [--merge-base] "
 "[<common-diff-options>] <tree-ish> [<path>...]"
 "\n"
 COMMON_DIFF_OPTIONS_HELP;
index df44e5cc0d1171334a846817ef19e6f98feca48f..5d5ac0387165fa8f4fb5a4c22b0f0f002f0e1545 100644 (file)
@@ -7,7 +7,7 @@
 
 static const char * const ls_remote_usage[] = {
        N_("git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
-          "              [-q | --quiet] [--exit-code] [--get-url]\n"
+          "              [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]\n"
           "              [--symref] [<repository> [<refs>...]]"),
        NULL
 };
index cfbd5c36c7640bc841a68bb5a524f025c43212fd..27c2ca06acb7d68571e6e4547a7670f62eef2619 100644 (file)
@@ -5,7 +5,7 @@
 #include "repository.h"
 
 static char const * const pack_refs_usage[] = {
-       N_("git pack-refs [<options>]"),
+       N_("git pack-refs [--all] [--no-prune]"),
        NULL
 };
 
index ee2a0807f011e817801f1dc45e858b99ced613a3..ee32c714a76a7a79e534d52664208638a5e80dd0 100644 (file)
  */
 
 static const char * const revert_usage[] = {
-       N_("git revert [<options>] <commit-ish>..."),
-       N_("git revert <subcommand>"),
+       N_("git revert [--[no-]edit] [-n] [-m parent-number] [-s] [-S[<keyid>]] <commit>..."),
+       N_("git revert (--continue | --skip | --abort | --quit)"),
        NULL
 };
 
 static const char * const cherry_pick_usage[] = {
-       N_("git cherry-pick [<options>] <commit-ish>..."),
-       N_("git cherry-pick <subcommand>"),
+       N_("git cherry-pick [--edit] [-n] [-m <parent-number>] [-s] [-x] [--ff]\n"
+          "                [-S[<keyid>]] <commit>..."),
+       N_("git cherry-pick (--continue | --skip | --abort | --quit)"),
        NULL
 };
 
index 64962be016825a47acddf374cd6ebf80db163af0..4c5d125fa0a1cb4a01deac04637bd4e71763c619 100644 (file)
@@ -20,6 +20,7 @@ static const char * const send_pack_usage[] = {
        N_("git send-pack [--mirror] [--dry-run] [--force]\n"
           "              [--receive-pack=<git-receive-pack>]\n"
           "              [--verbose] [--thin] [--atomic]\n"
+          "              [--[no-]signed | --signed=(true|false|if-asked)]\n"
           "              [<host>:]<directory> (--all | <ref>...)"),
        NULL,
 };
index 1b0f10225f0c2630fab0f67534e7135b30571c66..50b6df78df04e8ef70f74b2332ffb6db566e74bb 100644 (file)
@@ -5,8 +5,9 @@
 #include "parse-options.h"
 
 static const char * const git_symbolic_ref_usage[] = {
-       N_("git symbolic-ref [<options>] <name> [<ref>]"),
-       N_("git symbolic-ref -d [-q] <name>"),
+       N_("git symbolic-ref [-m <reason>] <name> <ref>"),
+       N_("git symbolic-ref [-q] [--short] <name>"),
+       N_("git symbolic-ref --delete [-q] <name>"),
        NULL
 };
 
index 75dece0e4f1c90c592f86a4881a01e6553d87613..d428c45dc8d812255336ed5da20804981d3be4ab 100644 (file)
 #include "date.h"
 
 static const char * const git_tag_usage[] = {
-       N_("git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]\n"
-          "        <tagname> [<head>]"),
+       N_("git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] [-e]\n"
+          "        <tagname> [<commit> | <object>]"),
        N_("git tag -d <tagname>..."),
-       N_("git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]\n"
-          "        [--format=<format>] [--merged <commit>] [--no-merged <commit>] [<pattern>...]"),
+       N_("git tag [-n[<num>]] -l [--contains <commit>] [--no-contains <commit>]\n"
+          "        [--points-at <object>] [--column[=<options>] | --no-column]\n"
+          "        [--create-reflog] [--sort=<key>] [--format=<format>]\n"
+          "        [--merged <commit>] [--no-merged <commit>] [<pattern>...]"),
        N_("git tag -v [--format=<format>] <tagname>..."),
        NULL
 };
index 880fffec58750ea52b15618341f6189bd5a878db..d2239c9ef4dac2b65c3875ce8b8cf0481516615f 100644 (file)
@@ -4,7 +4,7 @@
 #include "parse-options.h"
 
 static const char * const update_server_info_usage[] = {
-       "git update-server-info [--force]",
+       "git update-server-info [-f | --force]",
        NULL
 };
 
index 125af53885f89fbd4b691f5d9463774b12a66559..25b69da2bf2815796d885030c91dbf177a4c4e2e 100644 (file)
@@ -8,7 +8,8 @@
 #include "serve.h"
 
 static const char * const upload_pack_usage[] = {
-       N_("git upload-pack [<options>] <dir>"),
+       N_("git-upload-pack [--[no-]strict] [--timeout=<n>] [--stateless-rpc]\n"
+          "                [--advertise-refs] <directory>"),
        NULL
 };
 
index 40c69a0bedde5be02af557fd0c92efc1d2c857e5..3ebad32b0f14fffb5cfafce87411a534bccdf724 100644 (file)
@@ -16,7 +16,7 @@
 #include "gpg-interface.h"
 
 static const char * const verify_commit_usage[] = {
-               N_("git verify-commit [-v | --verbose] <commit>..."),
+               N_("git verify-commit [-v | --verbose] [--raw] <commit>..."),
                NULL
 };
 
index f45136a06ba76077891d9e5fae545ee8c297ddff..217566952d83ce0c657128d6d5e253bebc72f3bb 100644 (file)
@@ -15,7 +15,7 @@
 #include "ref-filter.h"
 
 static const char * const verify_tag_usage[] = {
-               N_("git verify-tag [-v | --verbose] [--format=<format>] <tag>..."),
+               N_("git verify-tag [-v | --verbose] [--format=<format>] [--raw] <tag>..."),
                NULL
 };
 
diff --git a/help.c b/help.c
index 991e33f8a6eb1950cff6fa9f9fbaa2a4909d640b..0dd5b98022065b71ae60a88295a1e3f7a18d480f 100644 (file)
--- a/help.c
+++ b/help.c
@@ -757,7 +757,7 @@ int cmd_version(int argc, const char **argv, const char *prefix)
        struct strbuf buf = STRBUF_INIT;
        int build_options = 0;
        const char * const usage[] = {
-               N_("git version [<options>]"),
+               N_("git version [--build-options]"),
                NULL
        };
        struct option options[] = {