From: Nguyen Thai Ngoc Duy Date: Sat, 06 Oct 2012 08:02:53 GMT Subject: Re: [PATCH/RFC] attr: allow pattern escape using backslash Message-ID: In-Reply-To: <7vzk40qbm1.fsf@alter.siamese.dyndns.org> On Sat, Oct 6, 2012 at 2:54 PM, Junio C Hamano wrote: > Shouldn't we do the same for quoting fnmatch(3) metacharacters? To > match a path component 'a' followed by an asterisk followed by 'b', > you could then write 'a\*b'. Same for quoting the backslash itself. I think my patch does that too. The thing it does not do is optimize this case so that we can do strcmp() instead of fnmatch() if the entire pattern does not contain any metacharacters but backslashes. I don't think it'll become popular enough to deserve an optimization. -- Duy