Re: [PATCH 2/3] wildmatch: support "no FNM_PATHNAME" mode

2012-12-20 Thread Nguyen Thai Ngoc Duy
On Thu, Dec 20, 2012 at 8:55 AM, Nguyen Thai Ngoc Duy wrote: >> As long as simpler patterns fnmatch() groks (namely, '?', '*', and >> '[class]' wildcards only) are not slowed down by replacing it with >> wildmatch(), that is, of course. > > I'm concerned about performance vs fnmatch too. I'll prob

Re: [PATCH 2/3] wildmatch: support "no FNM_PATHNAME" mode

2012-12-19 Thread Nguyen Thai Ngoc Duy
On Thu, Dec 20, 2012 at 12:24 AM, Junio C Hamano wrote: > When that happens, we should want to retain the same "do not bother > to descend into subdirectories that will never match" optimization > for a pattern like "Doc*tion/**/*.txt". Because of FNM_PATHNAME, we > can tell if a subdirectory is

Re: [PATCH 2/3] wildmatch: support "no FNM_PATHNAME" mode

2012-12-19 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > By default wildmatch(,, 0) is equivalent with fnmatch(,, FNM_PATHNAME). Is this stating a fact before or after the patch? I think it is more like: So far, wildmatch() has always honoured directory boundary and there was no way to turn it off. Make it be