Skip to content

Commit 7b9b634

Browse files
committed
Merge branch 'ab/doc-synopsis-and-cmd-usage'
The short-help text shown by "git cmd -h" and the synopsis text shown at the beginning of "git help cmd" have been made more consistent. * ab/doc-synopsis-and-cmd-usage: (34 commits) tests: assert consistent whitespace in -h output tests: start asserting that *.txt SYNOPSIS matches -h output doc txt & -h consistency: make "worktree" consistent worktree: define subcommand -h in terms of command -h reflog doc: list real subcommands up-front doc txt & -h consistency: make "commit" consistent doc txt & -h consistency: make "diff-tree" consistent doc txt & -h consistency: use "[<label>...]" for "zero or more" doc txt & -h consistency: make "annotate" consistent doc txt & -h consistency: make "stash" consistent doc txt & -h consistency: add missing options doc txt & -h consistency: use "git foo" form, not "git-foo" doc txt & -h consistency: make "bundle" consistent doc txt & -h consistency: make "read-tree" consistent doc txt & -h consistency: make "rerere" consistent doc txt & -h consistency: add missing options and labels doc txt & -h consistency: make output order consistent doc txt & -h consistency: add or fix optional "--" syntax doc txt & -h consistency: fix mismatching labels doc SYNOPSIS & -h: use "-" to separate words in labels, not "_" ...
2 parents 5af5e54 + a0343f3 commit 7b9b634

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+594
-199
lines changed

Documentation/CodingGuidelines

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,8 +663,8 @@ Writing Documentation:
663663
(One or more of <file>.)
664664

665665
Optional parts are enclosed in square brackets:
666-
[<extra>]
667-
(Zero or one <extra>.)
666+
[<file>...]
667+
(Zero or more of <file>.)
668668

669669
--exec-path[=<path>]
670670
(Option with an optional argument. Note that the "=" is inside the
@@ -678,6 +678,16 @@ Writing Documentation:
678678
[-q | --quiet]
679679
[--utf8 | --no-utf8]
680680

681+
Use spacing around "|" token(s), but not immediately after opening or
682+
before closing a [] or () pair:
683+
Do: [-q | --quiet]
684+
Don't: [-q|--quiet]
685+
686+
Don't use spacing around "|" tokens when they're used to seperate the
687+
alternate arguments of an option:
688+
Do: --track[=(direct|inherit)]
689+
Don't: --track[=(direct | inherit)]
690+
681691
Parentheses are used for grouping:
682692
[(<rev> | <range>)...]
683693
(Any number of either <rev> or <range>. Parens are needed to make

Documentation/git-annotate.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ git-annotate - Annotate file lines with commit information
88
SYNOPSIS
99
--------
1010
[verse]
11-
'git annotate' [<options>] <file> [<revision>]
11+
'git annotate' [<options>] [<rev-opts>] [<rev>] [--] <file>
1212

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

Documentation/git-clean.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ git-clean - Remove untracked files from the working tree
88
SYNOPSIS
99
--------
1010
[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>...]
1212

1313
DESCRIPTION
1414
-----------
@@ -20,16 +20,16 @@ Normally, only files unknown to Git are removed, but if the `-x`
2020
option is specified, ignored files are also removed. This can, for
2121
example, be useful to remove all build products.
2222

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.
2525

2626
OPTIONS
2727
-------
2828
-d::
29-
Normally, when no <path> is specified, git clean will not
29+
Normally, when no <pathspec> is specified, git clean will not
3030
recurse into untracked directories to avoid removing too much.
3131
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
3333
files matching the specified paths (with exceptions for nested
3434
git directories mentioned under `--force`) will be removed.
3535

Documentation/git-commit-graph.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ SYNOPSIS
1010
--------
1111
[verse]
1212
'git commit-graph verify' [--object-dir <dir>] [--shallow] [--[no-]progress]
13-
'git commit-graph write' <options> [--object-dir <dir>] [--[no-]progress]
13+
'git commit-graph write' [--object-dir <dir>] [--append]
14+
[--split[=<strategy>]] [--reachable | --stdin-packs | --stdin-commits]
15+
[--changed-paths] [--[no-]max-new-filters <n>] [--[no-]progress]
16+
<split options>
1417

1518

1619
DESCRIPTION

Documentation/git-credential-cache--daemon.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ git-credential-cache--daemon - Temporarily store user credentials in memory
88
SYNOPSIS
99
--------
1010
[verse]
11-
'git credential-cache{litdd}daemon' [--debug] <socket>
11+
'git credential-cache{litdd}daemon' [--debug] <socket-path>
1212

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

1616
NOTE: You probably don't want to invoke this command yourself; it is
1717
started automatically when you use linkgit:git-credential-cache[1].
1818

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>`
2020
for `git-credential-cache` clients. Clients may store and retrieve
2121
credentials. Each credential is held for a timeout specified by the
2222
client; once no credentials are held, the daemon exits.

Documentation/git-diff-files.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ git-diff-files - Compares files in the working tree and the index
99
SYNOPSIS
1010
--------
1111
[verse]
12-
'git diff-files' [-q] [-0|-1|-2|-3|-c|--cc] [<common-diff-options>] [<path>...]
12+
'git diff-files' [-q] [-0 | -1 | -2 | -3 | -c | --cc] [<common-diff-options>] [<path>...]
1313

1414
DESCRIPTION
1515
-----------

Documentation/git-fast-export.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ git-fast-export - Git data exporter
99
SYNOPSIS
1010
--------
1111
[verse]
12-
'git fast-export [<options>]' | 'git fast-import'
12+
'git fast-export' [<options>] | 'git fast-import'
1313

1414
DESCRIPTION
1515
-----------

Documentation/git-hash-object.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ git-hash-object - Compute object ID and optionally creates a blob from a file
99
SYNOPSIS
1010
--------
1111
[verse]
12-
'git hash-object' [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin [--literally]] [--] <file>...
12+
'git hash-object' [-t <type>] [-w] [--path=<file> | --no-filters]
13+
[--stdin [--literally]] [--] <file>...
1314
'git hash-object' [-t <type>] [-w] --stdin-paths [--no-filters]
1415

1516
DESCRIPTION

Documentation/git-interpret-trailers.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ git-interpret-trailers - Add or parse structured information in commit messages
88
SYNOPSIS
99
--------
1010
[verse]
11-
'git interpret-trailers' [<options>] [(--trailer <token>[(=|:)<value>])...] [<file>...]
12-
'git interpret-trailers' [<options>] [--parse] [<file>...]
11+
'git interpret-trailers' [--in-place] [--trim-empty]
12+
[(--trailer <token>[(=|:)<value>])...]
13+
[--parse] [<file>...]
1314

1415
DESCRIPTION
1516
-----------

Documentation/git-merge-base.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ git-merge-base - Find as good common ancestors as possible for a merge
99
SYNOPSIS
1010
--------
1111
[verse]
12-
'git merge-base' [-a|--all] <commit> <commit>...
13-
'git merge-base' [-a|--all] --octopus <commit>...
12+
'git merge-base' [-a | --all] <commit> <commit>...
13+
'git merge-base' [-a | --all] --octopus <commit>...
1414
'git merge-base' --is-ancestor <commit> <commit>
1515
'git merge-base' --independent <commit>...
1616
'git merge-base' --fork-point <ref> [<commit>]

0 commit comments

Comments
 (0)