git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH v3 0/4] cleanup revisions.txt
       [not found] <cover.1557071877.git.liu.denton@gmail.com>
@ 2019-05-05 16:06 ` Denton Liu
  2019-05-05 16:06   ` [PATCH v3 1/4] revisions.txt: change "rev" to "<rev>" Denton Liu
                     ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Denton Liu @ 2019-05-05 16:06 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Andreas Heiduk, Duy Nguyen, Junio C Hamano

Thanks again for the comments, Andreas! I've incorporated all of them
into this reroll.

---

Changes since v2:

* Marked more optional arguments with []
* Added Andreas' "revisions.txt: remove ambibuity between <rev>:<path>
  and :<path>" patch

Changes since v1:

* Added patch to fix instances of "rev" to "<rev>"
* Marked all optional rev arguments with []


Andreas Heiduk (1):
  revisions.txt: remove ambibuity between <rev>:<path> and :<path>

Denton Liu (3):
  revisions.txt: change "rev" to "<rev>"
  revisions.txt: mark optional rev arguments with []
  revisions.txt: mention <rev>~ form

 Documentation/revisions.txt | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

-- 
2.21.0.1049.geb646f7864


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v3 1/4] revisions.txt: change "rev" to "<rev>"
  2019-05-05 16:06 ` [PATCH v3 0/4] cleanup revisions.txt Denton Liu
@ 2019-05-05 16:06   ` Denton Liu
  2019-05-05 16:07   ` [PATCH v3 2/4] revisions.txt: mark optional rev arguments with [] Denton Liu
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Denton Liu @ 2019-05-05 16:06 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Andreas Heiduk, Duy Nguyen, Junio C Hamano

In revisions.txt, there were some instances of a rev argument being
written as "rev". However, since they didn't mean the string literal,
write "<rev>", instead.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
---
 Documentation/revisions.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
index 2337a995ec..e5f11691b1 100644
--- a/Documentation/revisions.txt
+++ b/Documentation/revisions.txt
@@ -159,12 +159,12 @@ thing no matter the case.
   '<rev>{caret}0'
   is a short-hand for '<rev>{caret}\{commit\}'.
 +
-'rev{caret}\{object\}' can be used to make sure 'rev' names an
-object that exists, without requiring 'rev' to be a tag, and
-without dereferencing 'rev'; because a tag is already an object,
+'<rev>{caret}\{object\}' can be used to make sure '<rev>' names an
+object that exists, without requiring '<rev>' to be a tag, and
+without dereferencing '<rev>'; because a tag is already an object,
 it does not have to be dereferenced even once to get to an object.
 +
-'rev{caret}\{tag\}' can be used to ensure that 'rev' identifies an
+'<rev>{caret}\{tag\}' can be used to ensure that '<rev>' identifies an
 existing tag object.
 
 '<rev>{caret}{}', e.g. 'v0.99.8{caret}{}'::
-- 
2.21.0.1049.geb646f7864


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v3 2/4] revisions.txt: mark optional rev arguments with []
  2019-05-05 16:06 ` [PATCH v3 0/4] cleanup revisions.txt Denton Liu
  2019-05-05 16:06   ` [PATCH v3 1/4] revisions.txt: change "rev" to "<rev>" Denton Liu
@ 2019-05-05 16:07   ` Denton Liu
  2019-05-05 16:07   ` [PATCH v3 3/4] revisions.txt: mention <rev>~ form Denton Liu
                     ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Denton Liu @ 2019-05-05 16:07 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Andreas Heiduk, Duy Nguyen, Junio C Hamano

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>
---
 Documentation/revisions.txt | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
index e5f11691b1..dd99770c47 100644
--- a/Documentation/revisions.txt
+++ b/Documentation/revisions.txt
@@ -65,7 +65,7 @@ some output processing may assume ref names in UTF-8.
 '@'::
   '@' alone is a shortcut for `HEAD`.
 
-'<refname>@{<date>}', e.g. 'master@\{yesterday\}', 'HEAD@{5 minutes ago}'::
+'[<refname>]@{<date>}', e.g. 'master@\{yesterday\}', 'HEAD@{5 minutes ago}'::
   A ref followed by the suffix '@' with a date specification
   enclosed in a brace
   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.
   The construct '@{-<n>}' means the <n>th branch/commit checked out
   before the current one.
 
-'<branchname>@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::
+'[<branchname>]@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::
   The suffix '@\{upstream\}' to a branchname (short form '<branchname>@\{u\}')
   refers to the branch that the branch specified by branchname is set to build on
   top of (configured with `branch.<name>.remote` and
@@ -103,7 +103,7 @@ some output processing may assume ref names in UTF-8.
   current one. These suffixes are also accepted when spelled in uppercase, and
   they mean the same thing no matter the case.
 
-'<branchname>@\{push\}', e.g. 'master@\{push\}', '@\{push\}'::
+'[<branchname>]@\{push\}', e.g. 'master@\{push\}', '@\{push\}'::
   The suffix '@\{push}' reports the branch "where we would push to" if
   `git push` were run while `branchname` was checked out (or the current
   `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,
 This suffix is also accepted when spelled in uppercase, and means the same
 thing no matter the case.
 
-'<rev>{caret}', e.g. 'HEAD{caret}, v1.5.1{caret}0'::
+'<rev>{caret}[<n>]', e.g. 'HEAD{caret}, v1.5.1{caret}0'::
   A suffix '{caret}' to a revision parameter means the first parent of
   that commit object.  '{caret}<n>' means the <n>th parent (i.e.
   '<rev>{caret}'
@@ -302,7 +302,7 @@ The 'r1{caret}@' notation means all parents of 'r1'.
 The 'r1{caret}!' notation includes commit 'r1' but excludes all of its parents.
 By itself, this notation denotes the single commit 'r1'.
 
-The '<rev>{caret}-<n>' notation includes '<rev>' but excludes the <n>th
+The '<rev>{caret}-[<n>]' notation includes '<rev>' but excludes the <n>th
 parent (i.e. a shorthand for '<rev>{caret}<n>..<rev>'), with '<n>' = 1 if
 not given. This is typically useful for merge commits where you
 can just pass '<commit>{caret}-' to get all the commits in the branch
-- 
2.21.0.1049.geb646f7864


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v3 3/4] revisions.txt: mention <rev>~ form
  2019-05-05 16:06 ` [PATCH v3 0/4] cleanup revisions.txt Denton Liu
  2019-05-05 16:06   ` [PATCH v3 1/4] revisions.txt: change "rev" to "<rev>" Denton Liu
  2019-05-05 16:07   ` [PATCH v3 2/4] revisions.txt: mark optional rev arguments with [] Denton Liu
@ 2019-05-05 16:07   ` Denton Liu
  2019-05-05 16:07   ` [PATCH v3 4/4] revisions.txt: remove ambibuity between <rev>:<path> and :<path> Denton Liu
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Denton Liu @ 2019-05-05 16:07 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Andreas Heiduk, Duy Nguyen, Junio C Hamano

In revisions.txt, the '<rev>^' form is mentioned but the '<rev>~' form
is missing. Although both forms are essentially equivalent (they each
get the first parent of the specified revision), we should mention the
latter for completeness. Make this change.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
---
 Documentation/revisions.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
index dd99770c47..a38ec7fb52 100644
--- a/Documentation/revisions.txt
+++ b/Documentation/revisions.txt
@@ -139,7 +139,9 @@ thing no matter the case.
   '<rev>{caret}0' means the commit itself and is used when '<rev>' is the
   object name of a tag object that refers to a commit object.
 
-'<rev>{tilde}<n>', e.g. 'master{tilde}3'::
+'<rev>{tilde}[<n>]', e.g. 'HEAD{tilde}, master{tilde}3'::
+  A suffix '{tilde}' to a revision parameter means the first parent of
+  that commit object.
   A suffix '{tilde}<n>' to a revision parameter means the commit
   object that is the <n>th generation ancestor of the named
   commit object, following only the first parents.  I.e. '<rev>{tilde}3' is
-- 
2.21.0.1049.geb646f7864


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v3 4/4] revisions.txt: remove ambibuity between <rev>:<path> and :<path>
  2019-05-05 16:06 ` [PATCH v3 0/4] cleanup revisions.txt Denton Liu
                     ` (2 preceding siblings ...)
  2019-05-05 16:07   ` [PATCH v3 3/4] revisions.txt: mention <rev>~ form Denton Liu
@ 2019-05-05 16:07   ` Denton Liu
  2019-05-05 16:10   ` [PATCH v3 0/4] cleanup revisions.txt Denton Liu
  2019-05-07 14:29   ` Denton Liu
  5 siblings, 0 replies; 8+ messages in thread
From: Denton Liu @ 2019-05-05 16:07 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Andreas Heiduk, Duy Nguyen, Junio C Hamano

From: Andreas Heiduk <asheiduk@gmail.com>

The revision ':README' is mentioned as an example for '<rev>:<path>'
but the explanation forwards to the ':<n>:<path>' syntax. At the same
time ':<n>:<path>' did not mark the '<n>:' as optional.

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Signed-off-by: Denton Liu <liu.denton@gmail.com>
---
Just for clarification, the correct procedure is to include my sign-off
on top of Andreas' when I'm forwarding patches, correct? If it's not,
Junio, please take my sign-off for me.

 Documentation/revisions.txt | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
index a38ec7fb52..82c1e5754e 100644
--- a/Documentation/revisions.txt
+++ b/Documentation/revisions.txt
@@ -196,19 +196,16 @@ existing tag object.
   Depending on the given text, the shell's word splitting rules might
   require additional quoting.
 
-'<rev>:<path>', e.g. 'HEAD:README', ':README', 'master:./README'::
+'<rev>:<path>', e.g. 'HEAD:README', 'master:./README'::
   A suffix ':' followed by a path names the blob or tree
   at the given path in the tree-ish object named by the part
   before the colon.
-  ':path' (with an empty part before the colon)
-  is a special case of the syntax described next: content
-  recorded in the index at the given path.
   A path starting with './' or '../' is relative to the current working directory.
   The given path will be converted to be relative to the working tree's root directory.
   This is most useful to address a blob or tree from a commit or tree that has
   the same tree structure as the working tree.
 
-':<n>:<path>', e.g. ':0:README', ':README'::
+':[<n>:]<path>', e.g. ':0:README', ':README'::
   A colon, optionally followed by a stage number (0 to 3) and a
   colon, followed by a path, names a blob object in the
   index at the given path. A missing stage number (and the colon
-- 
2.21.0.1049.geb646f7864


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 0/4] cleanup revisions.txt
  2019-05-05 16:06 ` [PATCH v3 0/4] cleanup revisions.txt Denton Liu
                     ` (3 preceding siblings ...)
  2019-05-05 16:07   ` [PATCH v3 4/4] revisions.txt: remove ambibuity between <rev>:<path> and :<path> Denton Liu
@ 2019-05-05 16:10   ` Denton Liu
  2019-05-07 14:29   ` Denton Liu
  5 siblings, 0 replies; 8+ messages in thread
From: Denton Liu @ 2019-05-05 16:10 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Andreas Heiduk, Duy Nguyen, Junio C Hamano

Sorry, I specified the wrong --in-reply-to. The correct parent message
should be this[1].

[1]: https://public-inbox.org/git/cover.1556367012.git.liu.denton@gmail.com/

On Sun, May 05, 2019 at 12:06:54PM -0400, Denton Liu wrote:
> Thanks again for the comments, Andreas! I've incorporated all of them
> into this reroll.
> 
> ---
> 
> Changes since v2:
> 
> * Marked more optional arguments with []
> * Added Andreas' "revisions.txt: remove ambibuity between <rev>:<path>
>   and :<path>" patch
> 
> Changes since v1:
> 
> * Added patch to fix instances of "rev" to "<rev>"
> * Marked all optional rev arguments with []
> 
> 
> Andreas Heiduk (1):
>   revisions.txt: remove ambibuity between <rev>:<path> and :<path>
> 
> Denton Liu (3):
>   revisions.txt: change "rev" to "<rev>"
>   revisions.txt: mark optional rev arguments with []
>   revisions.txt: mention <rev>~ form
> 
>  Documentation/revisions.txt | 29 ++++++++++++++---------------
>  1 file changed, 14 insertions(+), 15 deletions(-)
> 
> -- 
> 2.21.0.1049.geb646f7864
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 0/4] cleanup revisions.txt
  2019-05-05 16:06 ` [PATCH v3 0/4] cleanup revisions.txt Denton Liu
                     ` (4 preceding siblings ...)
  2019-05-05 16:10   ` [PATCH v3 0/4] cleanup revisions.txt Denton Liu
@ 2019-05-07 14:29   ` Denton Liu
  2019-05-07 15:16     ` Junio C Hamano
  5 siblings, 1 reply; 8+ messages in thread
From: Denton Liu @ 2019-05-07 14:29 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Andreas Heiduk, Duy Nguyen, Junio C Hamano

Hi Junio,

I noticed that there are both `dl/rev-tilde-doc-clarify` and
`dl/revisions-doc-update` branches. The latter comes from this patchset
and is a complete replacement for the former.

Thanks,

Denton

On Sun, May 05, 2019 at 12:06:54PM -0400, Denton Liu wrote:
> Thanks again for the comments, Andreas! I've incorporated all of them
> into this reroll.
> 
> ---
> 
> Changes since v2:
> 
> * Marked more optional arguments with []
> * Added Andreas' "revisions.txt: remove ambibuity between <rev>:<path>
>   and :<path>" patch
> 
> Changes since v1:
> 
> * Added patch to fix instances of "rev" to "<rev>"
> * Marked all optional rev arguments with []
> 
> 
> Andreas Heiduk (1):
>   revisions.txt: remove ambibuity between <rev>:<path> and :<path>
> 
> Denton Liu (3):
>   revisions.txt: change "rev" to "<rev>"
>   revisions.txt: mark optional rev arguments with []
>   revisions.txt: mention <rev>~ form
> 
>  Documentation/revisions.txt | 29 ++++++++++++++---------------
>  1 file changed, 14 insertions(+), 15 deletions(-)
> 
> -- 
> 2.21.0.1049.geb646f7864
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 0/4] cleanup revisions.txt
  2019-05-07 14:29   ` Denton Liu
@ 2019-05-07 15:16     ` Junio C Hamano
  0 siblings, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2019-05-07 15:16 UTC (permalink / raw)
  To: Denton Liu; +Cc: Git Mailing List, Andreas Heiduk, Duy Nguyen

Denton Liu <liu.denton@gmail.com> writes:

> I noticed that there are both `dl/rev-tilde-doc-clarify` and
> `dl/revisions-doc-update` branches. The latter comes from this patchset
> and is a complete replacement for the former.

Thanks for spotting.  Will replace the former with the updated
patches.

Thanks.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-05-07 15:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1557071877.git.liu.denton@gmail.com>
2019-05-05 16:06 ` [PATCH v3 0/4] cleanup revisions.txt Denton Liu
2019-05-05 16:06   ` [PATCH v3 1/4] revisions.txt: change "rev" to "<rev>" Denton Liu
2019-05-05 16:07   ` [PATCH v3 2/4] revisions.txt: mark optional rev arguments with [] Denton Liu
2019-05-05 16:07   ` [PATCH v3 3/4] revisions.txt: mention <rev>~ form Denton Liu
2019-05-05 16:07   ` [PATCH v3 4/4] revisions.txt: remove ambibuity between <rev>:<path> and :<path> Denton Liu
2019-05-05 16:10   ` [PATCH v3 0/4] cleanup revisions.txt Denton Liu
2019-05-07 14:29   ` Denton Liu
2019-05-07 15:16     ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).