From: Andreas Heiduk <asheiduk@gmail.com>
To: Denton Liu <liu.denton@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Cc: Duy Nguyen <pclouds@gmail.com>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2 2/3] revisions.txt: mark optional rev arguments with []
Date: Fri, 3 May 2019 09:17:53 +0200 [thread overview]
Message-ID: <1684a040-ebc0-2567-225e-d26aa13951a2@gmail.com> (raw)
In-Reply-To: <90c787c219d25f38c1d53ae837160994a7bc6355.1556367012.git.liu.denton@gmail.com>
Am 27.04.19 um 14:16 schrieb Denton Liu:
> 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.
>
> Signed-off-by: Denton Liu <liu.denton@gmail.com>
> ---
> Documentation/revisions.txt | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
> index e5f11691b1..68cce2ca06 100644
> --- a/Documentation/revisions.txt
> +++ b/Documentation/revisions.txt
I think I found another one here:
@@ -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
The doesn't give a hint that <refname> is optional but actually it is.
> @@ -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}'
next prev parent reply other threads:[~2019-05-03 7:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1684a040-ebc0-2567-225e-d26aa13951a2@gmail.com \
--to=asheiduk@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=liu.denton@gmail.com \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).