diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2012-10-15 13:26:02 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-10-15 14:58:19 -0700 |
commit | 237ec6e40d4fd1a0190c4ffde6d18278abc5853a (patch) | |
tree | 05364964ea6cb8f76ff212ab6548f2f5bc2fc83b /dir.c | |
parent | 4c251e5cb5c245ee3bb98c7cedbe944df93e45f4 (diff) | |
download | git-237ec6e40d4fd1a0190c4ffde6d18278abc5853a.tar.gz |
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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. |