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-04-23 01:24:12 +0400
committerRussell Belfer <rb@github.com>2013-04-23 23:57:30 +0400
commitab01cbd4ddd756c7beda3f483791cb5d4e211872 (patch)
treeb599369694a135a1350c906bdd90fd6088d93f7d /src/config.c
parent608d04667ae08e991c1ffa6f33573d15930245b3 (diff)
Add configs to repo config cache
This adds a bunch of additional config values to the repository config value cache and makes it easier to add a simple boolean config without creating enum values for each possible setting. Also, this fixes a bug in git_config_refresh where the config cache was not being cleared which could lead to potential incorrect values. The work to start using the new cached configs will come in the next couple of commits...
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c
index 1283522ca..cb9d4014c 100644
--- a/src/config.c
+++ b/src/config.c
@@ -293,6 +293,9 @@ int git_config_refresh(git_config *cfg)
error = file->refresh(file);
}
+ if (!error && GIT_REFCOUNT_OWNER(cfg) != NULL)
+ git_repository__cvar_cache_clear(GIT_REFCOUNT_OWNER(cfg));
+
return error;
}