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
This commit is contained in:
5
cache.h
5
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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user