summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-01-05 23:40:15 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-01-05 23:40:15 -0800
commit990a4fea96983d54c0dcc96352e4c86404eceb77 (patch)
treed6acc2d8d42d9b75101bbfe7904955356913b7dc /cache.h
parentMerge branch 'jk/fsck-dot-in-trees' (diff)
parenttree_entry_interesting: do basedir compare on wildcard patterns when possible (diff)
downloadtgif-990a4fea96983d54c0dcc96352e4c86404eceb77.tar.xz
Merge branch 'nd/pathspec-wildcard'
Optimize matching paths with common forms of pathspecs that contain wildcard characters. * nd/pathspec-wildcard: tree_entry_interesting: do basedir compare on wildcard patterns when possible pathspec: apply "*.c" optimization from exclude pathspec: do exact comparison on the leading non-wildcard part pathspec: save the non-wildcard length part
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 2b192d24ac..843689b68f 100644
--- a/cache.h
+++ b/cache.h
@@ -473,6 +473,8 @@ extern int index_name_is_other(const struct index_state *, const char *, int);
extern int ie_match_stat(const struct index_state *, struct cache_entry *, struct stat *, unsigned int);
extern int ie_modified(const struct index_state *, struct cache_entry *, struct stat *, unsigned int);
+#define PATHSPEC_ONESTAR 1 /* the pathspec pattern sastisfies GFNM_ONESTAR */
+
struct pathspec {
const char **raw; /* get_pathspec() result, not freed by free_pathspec() */
int nr;
@@ -482,7 +484,8 @@ struct pathspec {
struct pathspec_item {
const char *match;
int len;
- unsigned int use_wildcard:1;
+ int nowildcard_len;
+ int flags;
} *items;
};