git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Makefile: promote wildmatch to be the default fnmatch implementation

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
May 30, 2013, 01:34 UTC
Message-ID
<1369877684-5050-1-git-send-email-pclouds@gmail.com>

This makes git use wildmatch by default for all fnmatch() calls. Users who want to use system fnmatch (or compat fnmatch) need to set NO_WILDMATCH flag.

wildmatch is a drop-in fnmatch replacement with more features. Using wildmatch gives us a consistent behavior across platforms. The tentative plan is make it default with an opt-out for about 2 cycles, then remove NO_WILDMATCH and compat/fnmatch.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 0f931a2..efc8439 100644
--- a/Makefile
+++ b/Makefile
@@ -106,7 +106,7 @@ 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
+# Define NO_WILDMATCH if you do not want to use Git's wildmatch
 # implementation as fnmatch
 #
 # Define NO_GECOS_IN_PWENT if you don't have pw_gecos in struct passwd
@@ -1261,7 +1261,7 @@ ifdef NO_FNMATCH_CASEFOLD
 	COMPAT_OBJS += compat/fnmatch/fnmatch.o
 endif
 endif
-ifdef USE_WILDMATCH
+ifndef NO_WILDMATCH
 	COMPAT_CFLAGS += -DUSE_WILDMATCH
 endif
 ifdef NO_SETENV
-- 
1.8.2.82.gc24b958
Next: Junio C Hamano
Message 1 of 3 in “Makefile: promote wildmatch to be the default fnmatch implementation”
  1. Makefile: promote wildmatch to be the default fnmatch implementationNguyễn Thái Ngọc Duy, May 30, 2013
  2. Junio C HamanoMay 30, 2013
  3. Duy NguyenMay 30, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.