diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2012-06-07 14:53:36 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-06-07 11:33:38 -0700 |
commit | f9f6e2ce26e25661245a6faaf0b254524c1bfbd4 (patch) | |
tree | 92715b56b06f8a42bd1a17fbfb8d6d83106aa78d /dir.h | |
parent | fcd631ed84d61147b7cc8996cde533f8a8d1fca0 (diff) | |
download | git-f9f6e2ce26e25661245a6faaf0b254524c1bfbd4.tar.gz |
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.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |