summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-01-25 12:34:55 -0800
committerJunio C Hamano <gitster@pobox.com>2013-01-25 12:34:55 -0800
commit9ecd9f5dc300235593e4d3e4ecff4448f2500bad (patch)
tree507832849bd8e8f3ec7bd5b0a55b915336a43df8 /dir.c
parentbb9aa109fd3df92cde642d67ba8a331c555d11ae (diff)
parentcebcab189aa7727af5027f0215e798bbe66f2815 (diff)
downloadgit-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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index cf1e6b0082..57394e452e 100644
--- a/dir.c
+++ b/dir.c
@@ -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;
}
/*