summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2012-10-15 06:26:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-10-15 21:58:19 (GMT)
commit237ec6e40d4fd1a0190c4ffde6d18278abc5853a (patch)
tree05364964ea6cb8f76ff212ab6548f2f5bc2fc83b /dir.c
parent4c251e5cb5c245ee3bb98c7cedbe944df93e45f4 (diff)
downloadgit-237ec6e40d4fd1a0190c4ffde6d18278abc5853a.zip
git-237ec6e40d4fd1a0190c4ffde6d18278abc5853a.tar.gz
git-237ec6e40d4fd1a0190c4ffde6d18278abc5853a.tar.bz2
Support "**" wildcard in .gitignore and .gitattributes
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 'dir.c')
-rw-r--r--dir.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index ee8e711..cb7328b 100644
--- a/dir.c
+++ b/dir.c
@@ -8,6 +8,7 @@
#include "cache.h"
#include "dir.h"
#include "refs.h"
+#include "wildmatch.h"
struct path_simplify {
int len;
@@ -593,7 +594,8 @@ int match_pathname(const char *pathname, int pathlen,
namelen -= prefix;
}
- return fnmatch_icase(pattern, name, FNM_PATHNAME) == 0;
+ return wildmatch(pattern, name,
+ ignore_case ? FNM_CASEFOLD : 0) == 0;
}
/* Scan the list and let the last match determine the fate.