1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-11 01:06:34 +02:00

Use proper syntax for replaceables in command docs

The standard for command documentation synopses appears to be:

  [...] means optional
  <...> means replaceable
  [<...>] means both optional and replaceable

So fix a number of doc pages that use incorrect variations of the
above.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Robert P. J. Day 2018-05-24 16:11:39 -04:00 committed by Junio C Hamano
parent e144d126d7
commit de613050ef
19 changed files with 38 additions and 38 deletions

View File

@ -8,7 +8,7 @@ git-annotate - Annotate file lines with commit information
SYNOPSIS SYNOPSIS
-------- --------
[verse] [verse]
'git annotate' [options] file [revision] 'git annotate' [<options>] <file> [<revision>]
DESCRIPTION DESCRIPTION
----------- -----------

View File

@ -9,8 +9,8 @@ git-check-attr - Display gitattributes information
SYNOPSIS SYNOPSIS
-------- --------
[verse] [verse]
'git check-attr' [-a | --all | attr...] [--] pathname... 'git check-attr' [-a | --all | <attr>...] [--] <pathname>...
'git check-attr' --stdin [-z] [-a | --all | attr...] 'git check-attr' --stdin [-z] [-a | --all | <attr>...]
DESCRIPTION DESCRIPTION
----------- -----------

View File

@ -9,8 +9,8 @@ git-check-ignore - Debug gitignore / exclude files
SYNOPSIS SYNOPSIS
-------- --------
[verse] [verse]
'git check-ignore' [options] pathname... 'git check-ignore' [<options>] <pathname>...
'git check-ignore' [options] --stdin 'git check-ignore' [<options>] --stdin
DESCRIPTION DESCRIPTION
----------- -----------

View File

@ -9,7 +9,7 @@ git-check-mailmap - Show canonical names and email addresses of contacts
SYNOPSIS SYNOPSIS
-------- --------
[verse] [verse]
'git check-mailmap' [options] <contact>... 'git check-mailmap' [<options>] <contact>...
DESCRIPTION DESCRIPTION

View File

@ -8,7 +8,7 @@ git-credential-cache - Helper to temporarily store passwords in memory
SYNOPSIS SYNOPSIS
-------- --------
----------------------------- -----------------------------
git config credential.helper 'cache [options]' git config credential.helper 'cache [<options>]'
----------------------------- -----------------------------
DESCRIPTION DESCRIPTION

View File

@ -8,7 +8,7 @@ git-credential-store - Helper to store credentials on disk
SYNOPSIS SYNOPSIS
-------- --------
------------------- -------------------
git config credential.helper 'store [options]' git config credential.helper 'store [<options>]'
------------------- -------------------
DESCRIPTION DESCRIPTION

View File

@ -22,7 +22,7 @@ cvspserver stream tcp nowait nobody /usr/bin/git-cvsserver git-cvsserver pserver
Usage: Usage:
[verse] [verse]
'git-cvsserver' [options] [pserver|server] [<directory> ...] 'git-cvsserver' [<options>] [pserver|server] [<directory> ...]
OPTIONS OPTIONS
------- -------

View File

@ -9,11 +9,11 @@ git-diff - Show changes between commits, commit and working tree, etc
SYNOPSIS SYNOPSIS
-------- --------
[verse] [verse]
'git diff' [options] [<commit>] [--] [<path>...] 'git diff' [<options>] [<commit>] [--] [<path>...]
'git diff' [options] --cached [<commit>] [--] [<path>...] 'git diff' [<options>] --cached [<commit>] [--] [<path>...]
'git diff' [options] <commit> <commit> [--] [<path>...] 'git diff' [<options>] <commit> <commit> [--] [<path>...]
'git diff' [options] <blob> <blob> 'git diff' [<options>] <blob> <blob>
'git diff' [options] --no-index [--] <path> <path> 'git diff' [<options>] --no-index [--] <path> <path>
DESCRIPTION DESCRIPTION
----------- -----------
@ -21,7 +21,7 @@ Show changes between the working tree and the index or a tree, changes
between the index and a tree, changes between two trees, changes between between the index and a tree, changes between two trees, changes between
two blob objects, or changes between two files on disk. two blob objects, or changes between two files on disk.
'git diff' [options] [--] [<path>...]:: 'git diff' [<options>] [--] [<path>...]::
This form is to view the changes you made relative to This form is to view the changes you made relative to
the index (staging area for the next commit). In other the index (staging area for the next commit). In other
@ -29,7 +29,7 @@ two blob objects, or changes between two files on disk.
further add to the index but you still haven't. You can further add to the index but you still haven't. You can
stage these changes by using linkgit:git-add[1]. stage these changes by using linkgit:git-add[1].
'git diff' [options] --no-index [--] <path> <path>:: 'git diff' [<options>] --no-index [--] <path> <path>::
This form is to compare the given two paths on the This form is to compare the given two paths on the
filesystem. You can omit the `--no-index` option when filesystem. You can omit the `--no-index` option when
@ -38,7 +38,7 @@ two blob objects, or changes between two files on disk.
or when running the command outside a working tree or when running the command outside a working tree
controlled by Git. controlled by Git.
'git diff' [options] --cached [<commit>] [--] [<path>...]:: 'git diff' [<options>] --cached [<commit>] [--] [<path>...]::
This form is to view the changes you staged for the next This form is to view the changes you staged for the next
commit relative to the named <commit>. Typically you commit relative to the named <commit>. Typically you
@ -48,7 +48,7 @@ two blob objects, or changes between two files on disk.
<commit> is not given, it shows all staged changes. <commit> is not given, it shows all staged changes.
--staged is a synonym of --cached. --staged is a synonym of --cached.
'git diff' [options] <commit> [--] [<path>...]:: 'git diff' [<options>] <commit> [--] [<path>...]::
This form is to view the changes you have in your This form is to view the changes you have in your
working tree relative to the named <commit>. You can working tree relative to the named <commit>. You can
@ -56,18 +56,18 @@ two blob objects, or changes between two files on disk.
branch name to compare with the tip of a different branch name to compare with the tip of a different
branch. branch.
'git diff' [options] <commit> <commit> [--] [<path>...]:: 'git diff' [<options>] <commit> <commit> [--] [<path>...]::
This is to view the changes between two arbitrary This is to view the changes between two arbitrary
<commit>. <commit>.
'git diff' [options] <commit>..<commit> [--] [<path>...]:: 'git diff' [<options>] <commit>..<commit> [--] [<path>...]::
This is synonymous to the previous form. If <commit> on This is synonymous to the previous form. If <commit> on
one side is omitted, it will have the same effect as one side is omitted, it will have the same effect as
using HEAD instead. using HEAD instead.
'git diff' [options] <commit>\...<commit> [--] [<path>...]:: 'git diff' [<options>] <commit>\...<commit> [--] [<path>...]::
This form is to view the changes on the branch containing This form is to view the changes on the branch containing
and up to the second <commit>, starting at a common ancestor and up to the second <commit>, starting at a common ancestor
@ -87,7 +87,7 @@ and the range notations ("<commit>..<commit>" and
"<commit>\...<commit>") do not mean a range as defined in the "<commit>\...<commit>") do not mean a range as defined in the
"SPECIFYING RANGES" section in linkgit:gitrevisions[7]. "SPECIFYING RANGES" section in linkgit:gitrevisions[7].
'git diff' [options] <blob> <blob>:: 'git diff' [<options>] <blob> <blob>::
This form is to view the differences between the raw This form is to view the differences between the raw
contents of two blob objects. contents of two blob objects.

View File

@ -9,7 +9,7 @@ git-fast-export - Git data exporter
SYNOPSIS SYNOPSIS
-------- --------
[verse] [verse]
'git fast-export [options]' | 'git fast-import' 'git fast-export [<options>]' | 'git fast-import'
DESCRIPTION DESCRIPTION
----------- -----------

View File

@ -9,7 +9,7 @@ git-fast-import - Backend for fast Git data importers
SYNOPSIS SYNOPSIS
-------- --------
[verse] [verse]
frontend | 'git fast-import' [options] frontend | 'git fast-import' [<options>]
DESCRIPTION DESCRIPTION
----------- -----------

View File

@ -8,8 +8,8 @@ git-interpret-trailers - add or parse structured information in commit messages
SYNOPSIS SYNOPSIS
-------- --------
[verse] [verse]
'git interpret-trailers' [options] [(--trailer <token>[(=|:)<value>])...] [<file>...] 'git interpret-trailers' [<options>] [(--trailer <token>[(=|:)<value>])...] [<file>...]
'git interpret-trailers' [options] [--parse] [<file>...] 'git interpret-trailers' [<options>] [--parse] [<file>...]
DESCRIPTION DESCRIPTION
----------- -----------

View File

@ -9,7 +9,7 @@ git-pull - Fetch from and integrate with another repository or a local branch
SYNOPSIS SYNOPSIS
-------- --------
[verse] [verse]
'git pull' [options] [<repository> [<refspec>...]] 'git pull' [<options>] [<repository> [<refspec>...]]
DESCRIPTION DESCRIPTION

View File

@ -8,9 +8,9 @@ git-rebase - Reapply commits on top of another base tip
SYNOPSIS SYNOPSIS
-------- --------
[verse] [verse]
'git rebase' [-i | --interactive] [options] [--exec <cmd>] [--onto <newbase>] 'git rebase' [-i | --interactive] [<options>] [--exec <cmd>] [--onto <newbase>]
[<upstream> [<branch>]] [<upstream> [<branch>]]
'git rebase' [-i | --interactive] [options] [--exec <cmd>] [--onto <newbase>] 'git rebase' [-i | --interactive] [<options>] [--exec <cmd>] [--onto <newbase>]
--root [<branch>] --root [<branch>]
'git rebase' --continue | --skip | --abort | --quit | --edit-todo | --show-current-patch 'git rebase' --continue | --skip | --abort | --quit | --edit-todo | --show-current-patch

View File

@ -9,7 +9,7 @@ git-rev-parse - Pick out and massage parameters
SYNOPSIS SYNOPSIS
-------- --------
[verse] [verse]
'git rev-parse' [ --option ] <args>... 'git rev-parse' [<options>] <args>...
DESCRIPTION DESCRIPTION
----------- -----------
@ -360,7 +360,7 @@ Example
------------ ------------
OPTS_SPEC="\ OPTS_SPEC="\
some-command [options] <args>... some-command [<options>] <args>...
some-command does foo and bar! some-command does foo and bar!
-- --
@ -385,7 +385,7 @@ When `"$@"` is `-h` or `--help` in the above example, the following
usage text would be shown: usage text would be shown:
------------ ------------
usage: some-command [options] <args>... usage: some-command [<options>] <args>...
some-command does foo and bar! some-command does foo and bar!

View File

@ -9,7 +9,7 @@ git-send-email - Send a collection of patches as emails
SYNOPSIS SYNOPSIS
-------- --------
[verse] [verse]
'git send-email' [options] <file|directory|rev-list options>... 'git send-email' [<options>] <file|directory|rev-list options>...
'git send-email' --dump-aliases 'git send-email' --dump-aliases

View File

@ -9,7 +9,7 @@ git-show - Show various types of objects
SYNOPSIS SYNOPSIS
-------- --------
[verse] [verse]
'git show' [options] [<object>...] 'git show' [<options>] [<object>...]
DESCRIPTION DESCRIPTION
----------- -----------

View File

@ -8,7 +8,7 @@ git-svn - Bidirectional operation between a Subversion repository and Git
SYNOPSIS SYNOPSIS
-------- --------
[verse] [verse]
'git svn' <command> [options] [arguments] 'git svn' <command> [<options>] [<arguments>]
DESCRIPTION DESCRIPTION
----------- -----------

View File

@ -8,7 +8,7 @@ git-web--browse - Git helper script to launch a web browser
SYNOPSIS SYNOPSIS
-------- --------
[verse] [verse]
'git web{litdd}browse' [OPTIONS] URL/FILE ... 'git web{litdd}browse' [<options>] <url|file>...
DESCRIPTION DESCRIPTION
----------- -----------

View File

@ -110,8 +110,8 @@ couple of magic command-line options:
+ +
--------------------------------------------- ---------------------------------------------
$ git describe -h $ git describe -h
usage: git describe [options] <commit-ish>* usage: git describe [<options>] <commit-ish>*
or: git describe [options] --dirty or: git describe [<options>] --dirty
--contains find the tag that comes after the commit --contains find the tag that comes after the commit
--debug debug search strategy on stderr --debug debug search strategy on stderr