Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-01-06 11:40:15 +0400
committerJunio C Hamano <gitster@pobox.com>2013-01-06 11:40:15 +0400
commit990a4fea96983d54c0dcc96352e4c86404eceb77 (patch)
treed6acc2d8d42d9b75101bbfe7904955356913b7dc /cache.h
parentd65d991b6543d8dcc8d10dd99a92a63693bcd54e (diff)
parentc904cd89e4328c0b5041b6ee0bb2df32459a33a2 (diff)
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;
};