From: Andreas Heiduk <asheiduk@gmail.com>
To: ryenus <ryenus@gmail.com>, Git mailing list <git@vger.kernel.org>
Subject: Re: [PATCH] fix revisions doc about quoting for ':/' notation
Date: Wed, 16 Aug 2017 23:15:47 +0200 [thread overview]
Message-ID: <956ccc83-c291-4217-795c-fcef33fac35b@gmail.com> (raw)
In-Reply-To: <CAKkAvazj28RR1nHEWNNeZeyE6mpkb3opk6kvrxP6Lau6tcCbJQ@mail.gmail.com>
Am 16.08.2017 um 05:21 schrieb ryenus:
> To make sure the `<text>` in `:/<text>` is seen as one search string,
> one should quote/escape `<text>` properly.
>
> Especially, the example given in the manual `:/fix nasty bug` does not
> work because of missing quotes. The examples are now corrected, and a
> note about quoting/escaping is added as well.
Right now the documentation describes the syntax as git sees the
parameters. This is agnostic of the shell or other UI with their
different quoting rules. For example users of fish must quote
`rev@{2}`. A GUI might require no quoting at all. In that case `:/"fix
nasty bugs"` would be given to git verbatim and hence not find the revision.
Also: Other examples like `HEAD@{5 minutes ago}` need the same quoting.
So my suggestion is to not use quoting in the examples and provide only
a hint in the text. Example:
<rev>{caret}{/<text>}', e.g. 'HEAD^{/fix nasty bug}'::
A suffix '{caret}' to a revision parameter, followed by a brace
pair that contains a text led by a slash,
is the same as the ':/fix nasty bug' syntax below except that
it returns the youngest matching commit which is reachable from
the '<rev>' before '{caret}'.
+ Depending on the given text the shell's word splitting rules
+ might require additional quoting.
next prev parent reply other threads:[~2017-08-16 21:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 3:21 [PATCH] fix revisions doc about quoting for ':/' notation ryenus
2017-08-16 18:49 ` Junio C Hamano
2017-08-16 21:15 ` Andreas Heiduk [this message]
2017-08-16 21:57 ` Junio C Hamano
2017-08-17 7:01 ` ryenus
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=956ccc83-c291-4217-795c-fcef33fac35b@gmail.com \
--to=asheiduk@gmail.com \
--cc=git@vger.kernel.org \
--cc=ryenus@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.
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 NNTP newsgroup(s).