aboutsummaryrefslogtreecommitdiff
path: root/dir.h
diff options
context:
space:
mode:
authorLars Knoll <lars@trolltech.com>2007-10-28 21:27:13 +0100
committerJunio C Hamano <gitster@pobox.com>2007-10-29 17:03:11 -0700
commit68492fc73b7387fa72d09545f5743728c5fdb419 (patch)
tree8c1ac604af1977d4373bed2c8b622126ccda27f7 /dir.h
parent79f3368d9a1bba022f38806b67c25ffffc0e7e92 (diff)
downloadgit-68492fc73b7387fa72d09545f5743728c5fdb419.tar.gz
git-68492fc73b7387fa72d09545f5743728c5fdb419.tar.xz
Speedup scanning for excluded files.
Try to avoid a lot of work scanning for excluded files, by caching some more information when setting up the exclusion data structure. Speeds up 'git runstatus' on a repository containing the Qt sources by 30% and reduces the amount of instructions executed (as measured by valgrind) by a factor of 2. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.h')
-rw-r--r--dir.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/dir.h b/dir.h
index a248a23ac..aaa247b25 100644
--- a/dir.h
+++ b/dir.h
@@ -17,13 +17,20 @@ struct dir_entry {
char name[FLEX_ARRAY]; /* more */
};
+#define EXC_FLAG_NODIR 1
+#define EXC_FLAG_NOWILDCARD 2
+#define EXC_FLAG_ENDSWITH 4
+
struct exclude_list {
int nr;
int alloc;
struct exclude {
const char *pattern;
+ int patternlen;
const char *base;
int baselen;
+ int to_exclude;
+ int flags;
} **excludes;
};