From: Junio C Hamano <gitster@pobox•com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH 1/2] glossary-content.txt: remove an obsolete paragrah
Date: Thu, 21 Nov 2013 15:55:29 -0800 [thread overview]
Message-ID: <xmqqy54h1f9q.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <xmqqtxf54o83.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Thu, 21 Nov 2013 10:13:48 -0800")
Junio C Hamano <gitster@pobox•com> writes:
An addendum.
> As we can see in a later paragaph:
>
> The "magic signature" consists of an ASCII symbol that is not
> alphanumeric. Currently only the slash `/` is recognized as a
> "magic signature"...
>
> the correct way to read that "a character that cannot be a magic
> signature" is "a character that is not 'an ASCII symbol that is not
> alphanumeric'", which means you can do:
>
> :!/foo - with magic signatures ! and /, pattern begins at 'f'
>
> :/#abc - with magic signatures # and /, pattern begins at 'a',
> even if in a particular version of Git, '#' magic
> signature may be invalid and produce an error
>
> :/:#abc - with magic signature /, pattern is "#abc".
>
> but because the definition of "magic signature" syntax comes later
> than "cannot be", it is prone to be misinterpreted as "anything that
> is not currently defined as a magic signature (namely, '/')".
... and that misinterpretation may give a false impression that
":/#abc"
is with the magic signature '/' (i.e. match from top) for a pattern
"#abc".
Doing so would mean that a version of Git that does not support a
magic signature '#' will allow people and scripts to use ":/#abc"
with such a meaning, and will prevent us from using '#' as a new
magic signature with some useful meaning in the future. Rather, we
need to force them to always spell it as ":/:#abc" even in the
version of Git before the magic signature '#'.
And the phrasing 'if the pattern begins with a character that cannot
be a "magic signature" and is not a colon' needs to be clarified to
avoid that misinterpretation for that reason.
next prev parent reply other threads:[~2013-11-21 23:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-20 1:26 [PATCH] diff: restrict pathspec limitations to diff b/f case only Nguyễn Thái Ngọc Duy
2013-11-20 22:43 ` Junio C Hamano
2013-11-21 6:44 ` [PATCH 1/2] glossary-content.txt: remove an obsolete paragrah Nguyễn Thái Ngọc Duy
2013-11-21 6:44 ` [PATCH 2/2] glossary-content.txt: fix documentation of "**" patterns Nguyễn Thái Ngọc Duy
2013-11-21 18:13 ` [PATCH 1/2] glossary-content.txt: remove an obsolete paragrah Junio C Hamano
2013-11-21 23:55 ` Junio C Hamano [this message]
2013-11-22 1:36 ` Duy Nguyen
2013-11-22 5:40 ` Junio C Hamano
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=xmqqy54h1f9q.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=pclouds@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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