On Fri, Oct 12, 2012 at 2:22 PM, Johannes Sixt <j.s...@viscovery.net> wrote: > Am 10/10/2012 12:40, schrieb Nguyễn Thái Ngọc Duy: >> fnmatch on glibc-2.12.1 returns no match. glibc-2.15 returns ok. > > There are many more cases that fail with the fnmatch() that we ship in > compat/fnmatch. To test this on Linux, you have to remove the "#if defined > _LIBC || !defined __GNU_LIBRARY__" brackets from compat/fnmatch/fnmatch.c > and build with NO_FNMATCH.
Thanks. The point of checking against fnmatch is to make sure that wildmatch does not divert in behavior from fnmatch. For some corner cases that behavior is undefined, I think it is ok for different fnmatch versions to behave differently. But some of failed tests make me worry about fnmatch. compat/fnmatch for example does not match '**/foo' with '/foo' (it does '*/foo' with '/foo'). 'A' is matched with '[[:digit:][:space:][:upper:]]' but not '[[:digit:][:upper:][:space:]]'. Perhaps we better off convert git to use wildmatch only to keep matching behavior more reliable. wildmatch does not support non-FNM_PATHNAME mode, but that should be easy to fix. The only downside I see is fnmatch may support locale while wildmatch does not. -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html