git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] revisions.txt: mention <rev>~ form
@ 2019-04-22  6:12 Denton Liu
  2019-04-22  6:32 ` Junio C Hamano
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Denton Liu @ 2019-04-22  6:12 UTC (permalink / raw)
  To: Git Mailing List

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.

While we're at it, the brief form of '<rev>^' makes it seem as if no
numerical argument is accepted. Update documentation to make it obvious
that an optional numerical argument is accepted.

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

diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
index 2337a995ec..4ba7b4416a 100644
--- a/Documentation/revisions.txt
+++ b/Documentation/revisions.txt
@@ -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}'
@@ -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~, 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.1000.g11cd861522


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

end of thread, other threads:[~2019-05-03  8:13 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-22  6:12 [PATCH] revisions.txt: mention <rev>~ form Denton Liu
2019-04-22  6:32 ` Junio C Hamano
2019-04-22  7:39   ` Denton Liu
2019-04-22 11:21     ` Junio C Hamano
2019-04-22  9:59 ` Duy Nguyen
2019-04-24  1:05   ` Junio C Hamano
2019-04-26 20:55 ` Andreas Heiduk
2019-04-26 21:16   ` Denton Liu
2019-04-27 12:15 ` [PATCH v2 0/3] cleanup revisions.txt Denton Liu
2019-04-27 12:15   ` [PATCH v2 1/3] revisions.txt: change "rev" to "<rev>" Denton Liu
2019-04-27 12:16   ` [PATCH v2 2/3] revisions.txt: mark optional rev arguments with [] Denton Liu
2019-05-03  7:17     ` Andreas Heiduk
2019-05-03  7:35       ` Andreas Heiduk
2019-04-27 12:16   ` [PATCH v2 3/3] revisions.txt: mention <rev>~ form Denton Liu
2019-05-03  8:01   ` [PATCH v2 0/3] cleanup revisions.txt Andreas Heiduk
2019-05-03  8:13     ` Denton Liu

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