diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-01-25 12:34:55 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-25 12:34:55 -0800 |
commit | 9ecd9f5dc300235593e4d3e4ecff4448f2500bad (patch) | |
tree | 507832849bd8e8f3ec7bd5b0a55b915336a43df8 /dir.c | |
parent | bb9aa109fd3df92cde642d67ba8a331c555d11ae (diff) | |
parent | cebcab189aa7727af5027f0215e798bbe66f2815 (diff) | |
download | git-9ecd9f5dc300235593e4d3e4ecff4448f2500bad.tar.gz |
Merge branch 'nd/retire-fnmatch'
Replace our use of fnmatch(3) with a more feature-rich wildmatch.
A handful patches at the bottom have been moved to nd/wildmatch to
graduate as part of that branch, before this series solidifies.
We may want to mark USE_WILDMATCH as an experimental curiosity a
bit more clearly (i.e. should not be enabled in production
environment, because it will make the behaviour between builds
unpredictable).
* nd/retire-fnmatch:
Makefile: add USE_WILDMATCH to use wildmatch as fnmatch
wildmatch: advance faster in <asterisk> + <literal> patterns
wildmatch: make a special case for "*/" with FNM_PATHNAME
test-wildmatch: add "perf" command to compare wildmatch and fnmatch
wildmatch: support "no FNM_PATHNAME" mode
wildmatch: make dowild() take arbitrary flags
wildmatch: rename constants and update prototype
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -685,7 +685,8 @@ int match_pathname(const char *pathname, int pathlen, } return wildmatch(pattern, name, - ignore_case ? FNM_CASEFOLD : 0) == 0; + WM_PATHNAME | (ignore_case ? WM_CASEFOLD : 0), + NULL) == 0; } /* |