diff options
Diffstat (limited to 'src/attr.h')
| -rw-r--r-- | src/attr.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/attr.h b/src/attr.h index 825cbfe4e..75e98607f 100644 --- a/src/attr.h +++ b/src/attr.h @@ -8,6 +8,7 @@ #define INCLUDE_attr_h__ #include "attr_file.h" +#include "khash_str.h" #define GIT_ATTR_CONFIG "core.attributesfile" #define GIT_IGNORE_CONFIG "core.excludesfile" @@ -15,8 +16,8 @@ typedef struct { int initialized; git_pool pool; - git_hashtable *files; /* hash path to git_attr_file of rules */ - git_hashtable *macros; /* hash name to vector<git_attr_assignment> */ + git_khash_str *files; /* hash path to git_attr_file of rules */ + git_khash_str *macros; /* hash name to vector<git_attr_assignment> */ const char *cfg_attr_file; /* cached value of core.attributesfile */ const char *cfg_excl_file; /* cached value of core.excludesfile */ } git_attr_cache; @@ -26,6 +27,9 @@ extern int git_attr_cache__init(git_repository *repo); extern int git_attr_cache__insert_macro( git_repository *repo, git_attr_rule *macro); +extern git_attr_rule *git_attr_cache__lookup_macro( + git_repository *repo, const char *name); + extern int git_attr_cache__lookup_or_create_file( git_repository *repo, const char *key, |
