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?