From c41244e702fd4fc1039f39a3915ae1e5f165bbf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Tue, 1 Jan 2013 09:44:07 +0700 Subject: wildmatch: support "no FNM_PATHNAME" mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So far, wildmatch() has always honoured directory boundary and there was no way to turn it off. Make it behave more like fnmatch() by requiring all callers that want the FNM_PATHNAME behaviour to pass that in the equivalent flag WM_PATHNAME. Callers that do not specify WM_PATHNAME will get wildcards like ? and * in their patterns matched against '/', just like not passing FNM_PATHNAME to fnmatch(). Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- wildmatch.h | 1 + 1 file changed, 1 insertion(+) (limited to 'wildmatch.h') diff --git a/wildmatch.h b/wildmatch.h index 1c814fd5ff..4090c8f4bb 100644 --- a/wildmatch.h +++ b/wildmatch.h @@ -2,6 +2,7 @@ #define WILDMATCH_H #define WM_CASEFOLD 1 +#define WM_PATHNAME 2 #define WM_ABORT_MALFORMED 2 #define WM_NOMATCH 1 -- cgit v1.2.3