diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-01-05 23:40:15 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-05 23:40:15 -0800 |
commit | 990a4fea96983d54c0dcc96352e4c86404eceb77 (patch) | |
tree | d6acc2d8d42d9b75101bbfe7904955356913b7dc /cache.h | |
parent | Merge branch 'jk/fsck-dot-in-trees' (diff) | |
parent | tree_entry_interesting: do basedir compare on wildcard patterns when possible (diff) | |
download | tgif-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.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; }; |