summaryrefslogtreecommitdiff
path: root/dir.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2012-06-07 07:53:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-06-07 18:33:38 (GMT)
commitf9f6e2ce26e25661245a6faaf0b254524c1bfbd4 (patch)
tree92715b56b06f8a42bd1a17fbfb8d6d83106aa78d /dir.h
parentfcd631ed84d61147b7cc8996cde533f8a8d1fca0 (diff)
downloadgit-f9f6e2ce26e25661245a6faaf0b254524c1bfbd4.zip
git-f9f6e2ce26e25661245a6faaf0b254524c1bfbd4.tar.gz
git-f9f6e2ce26e25661245a6faaf0b254524c1bfbd4.tar.bz2
exclude: do strcmp as much as possible before fnmatch
this also avoids calling fnmatch() if the non-wildcard prefix is longer than basename 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.h')
-rw-r--r--dir.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.h b/dir.h
index 58b6fc7..39fc145 100644
--- a/dir.h
+++ b/dir.h
@@ -7,7 +7,6 @@ struct dir_entry {
};
#define EXC_FLAG_NODIR 1
-#define EXC_FLAG_NOWILDCARD 2
#define EXC_FLAG_ENDSWITH 4
#define EXC_FLAG_MUSTBEDIR 8
@@ -17,6 +16,7 @@ struct exclude_list {
struct exclude {
const char *pattern;
int patternlen;
+ int nowildcardlen;
const char *base;
int baselen;
int to_exclude;