Thread (2 messages) flat view 2 messages, 2 authors, 2021-03-26

Re: [PATCH v2 1/1] pathspec: warn for a no-glob entry that contains `**`

From: Eric Sunshine <hidden>
Date: 2021-03-26 01:33:13

On Thu, Mar 25, 2021 at 8:43 PM Junio C Hamano [off-list ref] wrote:
So, perhaps taking the first two paragraphs together and rewriting:

        When '/**/' appears in the pathspec, the user may be
        expecting that it would be matched using the "wildmatch"
        semantics, matching 0 or more directories.  But that is
        not what happens without ":(glob)" magic.

        Teach the pathspec parser to emit an advice message when a
        substring "/**/" appears in a pathspec element that does not
        have a ":(glob)" magic.  Make sure we don't disturb users
        who use ":(literal)" magic with such a substring, as it is
        clear they want to find these strings literally.
I haven't been following the discussion, but is there a reason we need
to penalize the user with a warning rather than helping, for instance
by inferring ":(glob)" in the presence of `/**/` if not otherwise
countermanded by ":(literal)" or whatnot?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help