summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-01-25 20:34:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-01-25 20:34:55 (GMT)
commit9ecd9f5dc300235593e4d3e4ecff4448f2500bad (patch)
tree507832849bd8e8f3ec7bd5b0a55b915336a43df8 /Makefile
parentbb9aa109fd3df92cde642d67ba8a331c555d11ae (diff)
parentcebcab189aa7727af5027f0215e798bbe66f2815 (diff)
downloadgit-9ecd9f5dc300235593e4d3e4ecff4448f2500bad.zip
git-9ecd9f5dc300235593e4d3e4ecff4448f2500bad.tar.gz
git-9ecd9f5dc300235593e4d3e4ecff4448f2500bad.tar.bz2
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 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 11e85a6..731b6a8 100644
--- a/Makefile
+++ b/Makefile
@@ -105,6 +105,9 @@ all::
# Define NO_FNMATCH_CASEFOLD if your fnmatch function doesn't have the
# FNM_CASEFOLD GNU extension.
#
+# Define USE_WILDMATCH if you want to use Git's wildmatch
+# implementation as fnmatch
+#
# Define NO_GECOS_IN_PWENT if you don't have pw_gecos in struct passwd
# in the C library.
#
@@ -1225,6 +1228,9 @@ ifdef NO_FNMATCH_CASEFOLD
COMPAT_OBJS += compat/fnmatch/fnmatch.o
endif
endif
+ifdef USE_WILDMATCH
+ COMPAT_CFLAGS += -DUSE_WILDMATCH
+endif
ifdef NO_SETENV
COMPAT_CFLAGS += -DNO_SETENV
COMPAT_OBJS += compat/setenv.o