doc txt & -h consistency: fix mismatching labels

Fix various inconsistencies between command SYNOPSIS and the corresponding -h output where our translatable labels didn't match up. In some cases we need to adjust the prose that follows the SYNOPSIS accordingly, as it refers back to the changed label. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Oct 13, 2022 at 17:39 UTC f6a8ef07009bf44e2fed292439161c241e09b40d
18 files changed +35 -35
Documentation/git-clean.txt
+5 -5
@@ -8,7 +8,7 @@ git-clean - Remove untracked files from the working tree
8 SYNOPSIS
9 --------
10 [verse]
11 -'git clean' [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <path>...
11 +'git clean' [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <pathspec>...
12
13 DESCRIPTION
14 -----------
@@ -20,16 +20,16 @@ Normally, only files unknown to Git are removed, but if the `-x`
20 option is specified, ignored files are also removed. This can, for
21 example, be useful to remove all build products.
22
23 -If any optional `<path>...` arguments are given, only those paths
24 -are affected.
23 +If any optional `<pathspec>...` arguments are given, only those paths
24 +that match the pathspec are affected.
25
26 OPTIONS
27 -------
28 -d::
29 - Normally, when no <path> is specified, git clean will not
29 + Normally, when no <pathspec> is specified, git clean will not
30 recurse into untracked directories to avoid removing too much.
31 Specify -d to have it recurse into such directories as well.
32 - If any paths are specified, -d is irrelevant; all untracked
32 + If a <pathspec> is specified, -d is irrelevant; all untracked
33 files matching the specified paths (with exceptions for nested
34 git directories mentioned under `--force`) will be removed.
35
Documentation/git-credential-cache--daemon.txt
+2 -2
@@ -8,7 +8,7 @@ git-credential-cache--daemon - Temporarily store user credentials in memory
8 SYNOPSIS
9 --------
10 [verse]
11 -'git credential-cache{litdd}daemon' [--debug] <socket>
11 +'git credential-cache{litdd}daemon' [--debug] <socket-path>
12
13 DESCRIPTION
14 -----------
@@ -16,7 +16,7 @@ DESCRIPTION
16 NOTE: You probably don't want to invoke this command yourself; it is
17 started automatically when you use linkgit:git-credential-cache[1].
18
19 -This command listens on the Unix domain socket specified by `<socket>`
19 +This command listens on the Unix domain socket specified by `<socket-path>`
20 for `git-credential-cache` clients. Clients may store and retrieve
21 credentials. Each credential is held for a timeout specified by the
22 client; once no credentials are held, the daemon exits.
Documentation/git-mv.txt
+2 -2
@@ -9,7 +9,7 @@ git-mv - Move or rename a file, a directory, or a symlink
9 SYNOPSIS
10 --------
11 [verse]
12 -'git mv' [<options>] <args>...
12 +'git mv' [<options>] <source>... <destination>
13
14 DESCRIPTION
15 -----------
@@ -30,7 +30,7 @@ OPTIONS
30 -------
31 -f::
32 --force::
33 - Force renaming or moving of a file even if the target exists
33 + Force renaming or moving of a file even if the <destination> exists.
34 -k::
35 Skip move or rename actions which would lead to an error
36 condition. An error happens when a source is neither existing nor
Documentation/git-receive-pack.txt
+2 -2
@@ -9,7 +9,7 @@ git-receive-pack - Receive what is pushed into the repository
9 SYNOPSIS
10 --------
11 [verse]
12 -'git-receive-pack' <directory>
12 +'git-receive-pack' <git-dir>
13
14 DESCRIPTION
15 -----------
@@ -38,7 +38,7 @@ its behavior, see linkgit:git-config[1].
38
39 OPTIONS
40 -------
41 -<directory>::
41 +<git-dir>::
42 The repository to sync into.
43
44 --http-backend-info-refs::
Documentation/git-tag.txt
+9 -9
@@ -9,7 +9,7 @@ git-tag - Create, list, delete or verify a tag object signed with GPG
9 SYNOPSIS
10 --------
11 [verse]
12 -'git tag' [-a | -s | -u <keyid>] [-f] [-m <msg> | -F <file>] [-e]
12 +'git tag' [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] [-e]
13 <tagname> [<commit> | <object>]
14 'git tag' -d <tagname>...
15 'git tag' [-n[<num>]] -l [--contains <commit>] [--no-contains <commit>]
@@ -26,19 +26,19 @@ to delete, list or verify tags.
26
27 Unless `-f` is given, the named tag must not yet exist.
28
29 -If one of `-a`, `-s`, or `-u <keyid>` is passed, the command
29 +If one of `-a`, `-s`, or `-u <key-id>` is passed, the command
30 creates a 'tag' object, and requires a tag message. Unless
31 `-m <msg>` or `-F <file>` is given, an editor is started for the user to type
32 in the tag message.
33
34 -If `-m <msg>` or `-F <file>` is given and `-a`, `-s`, and `-u <keyid>`
34 +If `-m <msg>` or `-F <file>` is given and `-a`, `-s`, and `-u <key-id>`
35 are absent, `-a` is implied.
36
37 Otherwise, a tag reference that points directly at the given object
38 (i.e., a lightweight tag) is created.
39
40 A GnuPG signed tag object will be created when `-s` or `-u
41 -<keyid>` is used. When `-u <keyid>` is not used, the
41 +<key-id>` is used. When `-u <key-id>` is not used, the
42 committer identity for the current user is used to find the
43 GnuPG key for signing. The configuration variable `gpg.program`
44 is used to specify custom GnuPG binary.
@@ -72,8 +72,8 @@ OPTIONS
72 Override `tag.gpgSign` configuration variable that is
73 set to force each and every tag to be signed.
74
75 --u <keyid>::
76 ---local-user=<keyid>::
75 +-u <key-id>::
76 +--local-user=<key-id>::
77 Make a GPG-signed tag, using the given key.
78
79 -f::
@@ -164,14 +164,14 @@ This option is only applicable when listing tags without annotation lines.
164 Use the given tag message (instead of prompting).
165 If multiple `-m` options are given, their values are
166 concatenated as separate paragraphs.
167 - Implies `-a` if none of `-a`, `-s`, or `-u <keyid>`
167 + Implies `-a` if none of `-a`, `-s`, or `-u <key-id>`
168 is given.
169
170 -F <file>::
171 --file=<file>::
172 Take the tag message from the given file. Use '-' to
173 read the message from the standard input.
174 - Implies `-a` if none of `-a`, `-s`, or `-u <keyid>`
174 + Implies `-a` if none of `-a`, `-s`, or `-u <key-id>`
175 is given.
176
177 -e::
@@ -220,7 +220,7 @@ it in the repository configuration as follows:
220
221 -------------------------------------
222 [user]
223 - signingKey = <gpg-keyid>
223 + signingKey = <gpg-key_id>
224 -------------------------------------
225
226 `pager.tag` is only respected when listing tags, i.e., when `-l` is
Documentation/git-upload-archive.txt
+2 -2
@@ -9,7 +9,7 @@ git-upload-archive - Send archive back to git-archive
9 SYNOPSIS
10 --------
11 [verse]
12 -'git upload-archive' <directory>
12 +'git upload-archive' <repository>
13
14 DESCRIPTION
15 -----------
@@ -54,7 +54,7 @@ access via non-smart-http.
54
55 OPTIONS
56 -------
57 -<directory>::
57 +<repository>::
58 The repository to get a tar archive from.
59
60 GIT
builtin/bugreport.c
+1 -1
@@ -60,7 +60,7 @@ static void get_populated_hooks(struct strbuf *hook_info, int nongit)
60 }
61
62 static const char * const bugreport_usage[] = {
63 - N_("git bugreport [(-o | --output-directory) <file>] [(-s | --suffix) <format>]\n"
63 + N_("git bugreport [(-o | --output-directory) <path>] [(-s | --suffix) <format>]\n"
64 " [--diagnose[=<mode>]]"),
65 NULL
66 };
builtin/clean.c
+1 -1
@@ -26,7 +26,7 @@ static struct string_list del_list = STRING_LIST_INIT_DUP;
26 static unsigned int colopts;
27
28 static const char *const builtin_clean_usage[] = {
29 - N_("git clean [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <paths>..."),
29 + N_("git clean [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <pathspec>..."),
30 NULL
31 };
32
builtin/commit-graph.c
+2 -2
@@ -10,10 +10,10 @@
10 #include "tag.h"
11
12 #define BUILTIN_COMMIT_GRAPH_VERIFY_USAGE \
13 - N_("git commit-graph verify [--object-dir <objdir>] [--shallow] [--[no-]progress]")
13 + N_("git commit-graph verify [--object-dir <dir>] [--shallow] [--[no-]progress]")
14
15 #define BUILTIN_COMMIT_GRAPH_WRITE_USAGE \
16 - N_("git commit-graph write [--object-dir <objdir>] [--append]\n" \
16 + N_("git commit-graph write [--object-dir <dir>] [--append]\n" \
17 " [--split[=<strategy>]] [--reachable | --stdin-packs | --stdin-commits]\n" \
18 " [--changed-paths] [--[no-]max-new-filters <n>] [--[no-]progress]\n" \
19 " <split options>")
builtin/for-each-repo.c
+1 -1
@@ -6,7 +6,7 @@
6 #include "string-list.h"
7
8 static const char * const for_each_repo_usage[] = {
9 - N_("git for-each-repo --config=<config> <command-args>"),
9 + N_("git for-each-repo --config=<config> <arguments>"),
10 NULL
11 };
12
builtin/pack-redundant.c
+1 -1
@@ -14,7 +14,7 @@
14 #define BLKSIZE 512
15
16 static const char pack_redundant_usage[] =
17 -"git pack-redundant [--verbose] [--alt-odb] (--all | <filename.pack>...)";
17 +"git pack-redundant [--verbose] [--alt-odb] (--all | <pack-filename>...)";
18
19 static int load_all_packs, verbose, alt_odb;
20
builtin/rerere.c
+1 -1
@@ -10,7 +10,7 @@
10 #include "pathspec.h"
11
12 static const char * const rerere_usage[] = {
13 - N_("git rerere [clear | forget <path>... | status | remaining | diff | gc]"),
13 + N_("git rerere [clear | forget <pathspec>... | status | remaining | diff | gc]"),
14 NULL,
15 };
16
builtin/rev-list.c
+1 -1
@@ -20,7 +20,7 @@
20 #include "packfile.h"
21
22 static const char rev_list_usage[] =
23 -"git rev-list [<options>] <commit-id>... [-- <path>...]\n"
23 +"git rev-list [<options>] <commit>... [-- <path>...]\n"
24 "\n"
25 " limiting output:\n"
26 " --max-count=<n>\n"
builtin/stash.c
+1 -1
@@ -22,7 +22,7 @@
22 #define INCLUDE_ALL_FILES 2
23
24 static const char * const git_stash_usage[] = {
25 - N_("git stash list [<options>]"),
25 + N_("git stash list [<log-options>]"),
26 N_("git stash show [<options>] [<stash>]"),
27 N_("git stash drop [-q | --quiet] [<stash>]"),
28 N_("git stash (pop | apply) [--index] [-q | --quiet] [<stash>]"),
builtin/unpack-file.c
+1 -1
@@ -27,7 +27,7 @@ int cmd_unpack_file(int argc, const char **argv, const char *prefix)
27 struct object_id oid;
28
29 if (argc != 2 || !strcmp(argv[1], "-h"))
30 - usage("git unpack-file <sha1>");
30 + usage("git unpack-file <blob>");
31 if (get_oid(argv[1], &oid))
32 die("Not a valid object name %s", argv[1]);
33
builtin/upload-archive.c
+1 -1
@@ -10,7 +10,7 @@
10 #include "strvec.h"
11
12 static const char upload_archive_usage[] =
13 - "git upload-archive <repo>";
13 + "git upload-archive <repository>";
14
15 static const char deadchild[] =
16 "git upload-archive: archiver died with error";
builtin/verify-pack.c
+1 -1
@@ -56,7 +56,7 @@ static int verify_one_pack(const char *path, unsigned int flags, const char *has
56 }
57
58 static const char * const verify_pack_usage[] = {
59 - N_("git verify-pack [-v | --verbose] [-s | --stat-only] <pack>..."),
59 + N_("git verify-pack [-v | --verbose] [-s | --stat-only] <pack>.idx..."),
60 NULL
61 };
62
builtin/worktree.c
+1 -1
@@ -23,7 +23,7 @@ static const char * const worktree_usage[] = {
23 N_("git worktree prune [<options>]"),
24 N_("git worktree remove [<options>] <worktree>"),
25 N_("git worktree repair [<path>...]"),
26 - N_("git worktree unlock <path>"),
26 + N_("git worktree unlock <worktree>"),
27 NULL
28 };
29