Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-01-01 06:44:07 +0400
committerJunio C Hamano <gitster@pobox.com>2013-01-02 03:32:37 +0400
commitc41244e702fd4fc1039f39a3915ae1e5f165bbf3 (patch)
tree2556fe7cadc647a95290472a832e32a784985090 /wildmatch.h
parent0c528168dadd4209de0213a16ff811a89ee3f206 (diff)
wildmatch: support "no FNM_PATHNAME" mode
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 <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wildmatch.h')
-rw-r--r--wildmatch.h1
1 files changed, 1 insertions, 0 deletions
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