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

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-05-24 22:09:04 +0400
committerRussell Belfer <rb@github.com>2013-05-24 22:09:04 +0400
commit7a5ee3dc923caf2b3b9b5e9b2408340f6ae32d7d (patch)
treeb0bac0291ac788c6771b02e4ed59e970d2c669c7 /src/attrcache.h
parentd20b044961352348855ee82dcc77615f605ac832 (diff)
Add ~ expansion to global attributes and excludes
This adds ~/ prefix expansion for the value of core.attributesfile and core.excludesfile, plus it fixes the fact that the attributes cache was holding on to the string data from the config for a long time (instead of making its own strdup) which could have caused a problem if the config was refreshed. Adds a test for the new expansion capability.
Diffstat (limited to 'src/attrcache.h')
-rw-r--r--src/attrcache.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/attrcache.h b/src/attrcache.h
index 12cec4bfb..077633b87 100644
--- a/src/attrcache.h
+++ b/src/attrcache.h
@@ -13,10 +13,10 @@
typedef struct {
int initialized;
git_pool pool;
- git_strmap *files; /* hash path to git_attr_file of rules */
- git_strmap *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_strmap *files; /* hash path to git_attr_file of rules */
+ git_strmap *macros; /* hash name to vector<git_attr_assignment> */
+ char *cfg_attr_file; /* cached value of core.attributesfile */
+ char *cfg_excl_file; /* cached value of core.excludesfile */
} git_attr_cache;
extern int git_attr_cache__init(git_repository *repo);