Documentation: add missing article in rev-list-options.txt
[gitweb.git] / setup.c
diff --git a/setup.c b/setup.c
index 72a4978ba5414af523a2c88a60a4d2d624606e85..979b13f0c6cd6bc3c265187e8ea79628bfe99f87 100644 (file)
--- a/setup.c
+++ b/setup.c
@@ -623,6 +623,15 @@ static const char *setup_git_directory_gently_1(int *nongit_ok)
        dev_t current_device = 0;
        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