Re: [PATCH 5/6] gitignore: do not do basename match with patterns that have '**'
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 4, 2012, 17:59 UTC
- Message-ID
- <7vsj9uyv6y.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1349336392-1772-6-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> - if (!strchr(p, '/')) > + if (!strchr(p, '/') && !strstr(p, "**"))
Doesn't wildmatch allow these to be quoted, similar to the way usual glob works, e.g.
$ >ff
$ >\?f
$ echo ??
?f ff
$ echo \?f
?fEven If wildmatch out-of-the-box doesn't, I would assume that we would want to fix it so that it does. And if that is the case, we would want to be careful about "two/asterisks\**in path" to avoid triggering this logic, no?