Skip to content

Commit 8c9e292

Browse files
avargitster
authored andcommitted
doc txt & -h consistency: add missing options and labels
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8f5f2f6 commit 8c9e292

19 files changed

+40
-26
lines changed

Documentation/git-send-pack.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ git-send-pack - Push objects over Git protocol to another repository
99
SYNOPSIS
1010
--------
1111
[verse]
12-
'git send-pack' [--dry-run] [--force] [--receive-pack=<git-receive-pack>]
12+
'git send-pack' [--mirror] [--dry-run] [--force]
13+
[--receive-pack=<git-receive-pack>]
1314
[--verbose] [--thin] [--atomic]
1415
[--[no-]signed | --signed=(true|false|if-asked)]
1516
[<host>:]<directory> (--all | <ref>...)

Documentation/git-sparse-checkout.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ git-sparse-checkout - Reduce your working tree to a subset of tracked files
99
SYNOPSIS
1010
--------
1111
[verse]
12-
'git sparse-checkout' <subcommand> [<options>]
12+
'git sparse-checkout' (init | list | set | add | reapply | disable) [<options>]
1313

1414

1515
DESCRIPTION

Documentation/git-update-server-info.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ git-update-server-info - Update auxiliary info file to help dumb servers
99
SYNOPSIS
1010
--------
1111
[verse]
12-
'git update-server-info'
12+
'git update-server-info' [-f | --force]
1313

1414
DESCRIPTION
1515
-----------
@@ -19,6 +19,12 @@ $GIT_OBJECT_DIRECTORY/info directories to help clients discover
1919
what references and packs the server has. This command
2020
generates such auxiliary files.
2121

22+
OPTIONS
23+
-------
24+
-f::
25+
--force::
26+
update the info files from scratch.
27+
2228
OUTPUT
2329
------
2430

Documentation/git-verify-commit.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ git-verify-commit - Check the GPG signature of commits
88
SYNOPSIS
99
--------
1010
[verse]
11-
'git verify-commit' <commit>...
11+
'git verify-commit' [-v | --verbose] [--raw] <commit>...
1212

1313
DESCRIPTION
1414
-----------

Documentation/git-verify-tag.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ git-verify-tag - Check the GPG signature of tags
88
SYNOPSIS
99
--------
1010
[verse]
11-
'git verify-tag' [--format=<format>] <tag>...
11+
'git verify-tag' [-v | --verbose] [--format=<format>] [--raw] <tag>...
1212

1313
DESCRIPTION
1414
-----------

builtin/credential-cache--daemon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ int cmd_credential_cache_daemon(int argc, const char **argv, const char *prefix)
267267
const char *socket_path;
268268
int ignore_sighup = 0;
269269
static const char *usage[] = {
270-
"git-credential-cache--daemon [opts] <socket-path>",
270+
"git-credential-cache--daemon [--debug] <socket-path>",
271271
NULL
272272
};
273273
int debug = 0;

builtin/describe.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
define_commit_slab(commit_names, struct commit_name *);
2424

2525
static const char * const describe_usage[] = {
26-
N_("git describe [<options>] [<commit-ish>...]"),
27-
N_("git describe [<options>] --dirty"),
26+
N_("git describe [--all] [--tags] [--contains] [--abbrev=<n>] [<commit-ish>...]"),
27+
N_("git describe [--all] [--tags] [--contains] [--abbrev=<n>] --dirty[=<mark>]"),
28+
N_("git describe <blob>"),
2829
NULL
2930
};
3031

builtin/diff-index.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "submodule.h"
1010

1111
static const char diff_cache_usage[] =
12-
"git diff-index [-m] [--cached] "
12+
"git diff-index [-m] [--cached] [--merge-base] "
1313
"[<common-diff-options>] <tree-ish> [<path>...]"
1414
"\n"
1515
COMMON_DIFF_OPTIONS_HELP;

builtin/ls-remote.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
static const char * const ls_remote_usage[] = {
99
N_("git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
10-
" [-q | --quiet] [--exit-code] [--get-url]\n"
10+
" [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]\n"
1111
" [--symref] [<repository> [<refs>...]]"),
1212
NULL
1313
};

builtin/pack-refs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "repository.h"
66

77
static char const * const pack_refs_usage[] = {
8-
N_("git pack-refs [<options>]"),
8+
N_("git pack-refs [--all] [--no-prune]"),
99
NULL
1010
};
1111

0 commit comments

Comments
 (0)