Re: [PATCH 1/2] glossary-content.txt: remove an obsolete paragrah
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 21, 2013, 23:55 UTC
- Message-ID
- <xmqqy54h1f9q.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <xmqqtxf54o83.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
An addendum.
Show 21 quoted lines
> 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.