aboutsummaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-09-02 13:24:17 -0700
committerJunio C Hamano <gitster@pobox.com>2014-09-02 13:24:18 -0700
commit56f214e0716dec043b50a7e1e8cc181be2ef7df2 (patch)
tree9233df7f61bba4048b92768a07b97db9ecb7b2d3 /setup.c
parente8e4ce72cd9ebb5e5dfe580f98b7764ca6dc08ea (diff)
parent4c715ebb96acc77008e9cbebc381738611c6006f (diff)
downloadgit-56f214e0716dec043b50a7e1e8cc181be2ef7df2.tar.xz
Merge branch 'ta/config-set'
Add in-core caching layer to let us avoid reading the same configuration files number of times. * ta/config-set: test-config: add tests for the config_set API add `config_set` API for caching config-like files
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/setup.c b/setup.c
index 0a22f8bd1d..793369da36 100644
--- a/setup.c
+++ b/setup.c
@@ -625,6 +625,15 @@ static const char *setup_git_directory_gently_1(int *nongit_ok)
int one_filesystem = 1;
/*
+ * We may have read an incomplete configuration before
+ * setting-up the git directory. If so, clear the cache so
+ * that the next queries to the configuration reload complete
+ * configuration (including the per-repo config file that we
+ * ignored previously).
+ */
+ git_config_clear();
+
+ /*
* Let's assume that we are in a git repository.
* If it turns out later that we are somewhere else, the value will be
* updated accordingly.