From f9f6e2ce26e25661245a6faaf0b254524c1bfbd4 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Thu, 7 Jun 2012 14:53:36 +0700 Subject: exclude: do strcmp as much as possible before fnmatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this also avoids calling fnmatch() if the non-wildcard prefix is longer than basename Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- dir.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dir.h') diff --git a/dir.h b/dir.h index 58b6fc7c86..39fc145b66 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; -- cgit v1.2.3