Re: [PATCH v2 1/1] pathspec: warn for a no-glob entry that contains `**`
Eric Sunshine <sunshine@sunshineco.com> writes:
> 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?
Two reasons I can think of offhand are
- How /**/ is interpreted is not the only thing that is different
between the normal mode and the glob magic mode. IIRC, an
asterisk * or a question mark ? matches slash in normal mode (it
started out as fnmatch() without FNM_PATHNAME). Should we warn
about ":(glob)" if somebody asks for "foo*", "*foo", or
"foo*bar". If not, why shouldn't?
- Thers is no explicit magic that says "there is no magic" to
countermand such a DWIM.