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
path: root/dir.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2012-10-15 10:26:02 +0400
committerJunio C Hamano <gitster@pobox.com>2012-10-16 01:58:19 +0400
commit237ec6e40d4fd1a0190c4ffde6d18278abc5853a (patch)
tree05364964ea6cb8f76ff212ab6548f2f5bc2fc83b /dir.c
parent4c251e5cb5c245ee3bb98c7cedbe944df93e45f4 (diff)
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 ee8e7115a8..cb7328b548 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.