revisions.txt: mark optional rev arguments with []
In revisions.txt, an optional rev argument was not distinguised. Instead, a user had to continue and read the description in order to learn that the argument was optional. Since the [] notation for an optional argument is common-knowledge in the Git documentation, mark optional arguments with [] so that it's more obvious for the reader. Helped-by: Andreas Heiduk <asheiduk@gmail.com> Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu committed
May 5, 2019 at 12:07 UTC
d86d207471e3411ceb2969f1066e31fb4ca144dc
1 file changed
+5
-5
Documentation/revisions.txt
+5
-5
@@ -65,7 +65,7 @@ some output processing may assume ref names in UTF-8.
65
'@'::
66
'@' alone is a shortcut for `HEAD`.
67
68
-'<refname>@{<date>}', e.g. 'master@\{yesterday\}', 'HEAD@{5 minutes ago}'::
68
+'[<refname>]@{<date>}', e.g. 'master@\{yesterday\}', 'HEAD@{5 minutes ago}'::
69
A ref followed by the suffix '@' with a date specification
70
enclosed in a brace
71
pair (e.g. '\{yesterday\}', '{1 month 2 weeks 3 days 1 hour 1
@@ -95,7 +95,7 @@ some output processing may assume ref names in UTF-8.
95
The construct '@{-<n>}' means the <n>th branch/commit checked out
96
before the current one.
97
98
-'<branchname>@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::
98
+'[<branchname>]@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::
99
The suffix '@\{upstream\}' to a branchname (short form '<branchname>@\{u\}')
100
refers to the branch that the branch specified by branchname is set to build on
101
top of (configured with `branch.<name>.remote` and
@@ -103,7 +103,7 @@ some output processing may assume ref names in UTF-8.
103
current one. These suffixes are also accepted when spelled in uppercase, and
104
they mean the same thing no matter the case.
105
106
-'<branchname>@\{push\}', e.g. 'master@\{push\}', '@\{push\}'::
106
+'[<branchname>]@\{push\}', e.g. 'master@\{push\}', '@\{push\}'::
107
The suffix '@\{push}' reports the branch "where we would push to" if
108
`git push` were run while `branchname` was checked out (or the current
109
`HEAD` if no branchname is specified). Since our push destination is
@@ -131,7 +131,7 @@ from one location and push to another. In a non-triangular workflow,
131
This suffix is also accepted when spelled in uppercase, and means the same
132
thing no matter the case.
133
134
-'<rev>{caret}', e.g. 'HEAD{caret}, v1.5.1{caret}0'::
134
+'<rev>{caret}[<n>]', e.g. 'HEAD{caret}, v1.5.1{caret}0'::
135
A suffix '{caret}' to a revision parameter means the first parent of
136
that commit object. '{caret}<n>' means the <n>th parent (i.e.
137
'<rev>{caret}'
@@ -301,7 +301,7 @@ The 'r1{caret}@' notation means all parents of 'r1'.
301
The 'r1{caret}!' notation includes commit 'r1' but excludes all of its parents.
302
By itself, this notation denotes the single commit 'r1'.
303
304
-The '<rev>{caret}-<n>' notation includes '<rev>' but excludes the <n>th
304
+The '<rev>{caret}-[<n>]' notation includes '<rev>' but excludes the <n>th
305
parent (i.e. a shorthand for '<rev>{caret}<n>..<rev>'), with '<n>' = 1 if
306
not given. This is typically useful for merge commits where you
307
can just pass '<commit>{caret}-' to get all the commits in the branch