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 "_" ...
This commit is contained in:
@@ -663,8 +663,8 @@ Writing Documentation:
|
||||
(One or more of <file>.)
|
||||
|
||||
Optional parts are enclosed in square brackets:
|
||||
[<extra>]
|
||||
(Zero or one <extra>.)
|
||||
[<file>...]
|
||||
(Zero or more of <file>.)
|
||||
|
||||
--exec-path[=<path>]
|
||||
(Option with an optional argument. Note that the "=" is inside the
|
||||
@@ -678,6 +678,16 @@ Writing Documentation:
|
||||
[-q | --quiet]
|
||||
[--utf8 | --no-utf8]
|
||||
|
||||
Use spacing around "|" token(s), but not immediately after opening or
|
||||
before closing a [] or () pair:
|
||||
Do: [-q | --quiet]
|
||||
Don't: [-q|--quiet]
|
||||
|
||||
Don't use spacing around "|" tokens when they're used to seperate the
|
||||
alternate arguments of an option:
|
||||
Do: --track[=(direct|inherit)]
|
||||
Don't: --track[=(direct | inherit)]
|
||||
|
||||
Parentheses are used for grouping:
|
||||
[(<rev> | <range>)...]
|
||||
(Any number of either <rev> or <range>. Parens are needed to make
|
||||
|
||||
Reference in New Issue
Block a user