pretty: allow showing specific trailers
[gitweb.git] / config.c
index 3461993f0af665d64b48d16915fc2cd017634377..4051e388230afb1fe96f1ffad35fcc36425d247b 100644 (file)
--- a/config.c
+++ b/config.c
@@ -2278,7 +2278,7 @@ int git_config_get_max_percent_split_change(void)
 int git_config_get_fsmonitor(void)
 {
        if (git_config_get_pathname("core.fsmonitor", &core_fsmonitor))
-               core_fsmonitor = getenv("GIT_FSMONITOR_TEST");
+               core_fsmonitor = getenv("GIT_TEST_FSMONITOR");
 
        if (core_fsmonitor && !*core_fsmonitor)
                core_fsmonitor = NULL;
@@ -2289,6 +2289,24 @@ int git_config_get_fsmonitor(void)
        return 0;
 }
 
+int git_config_get_index_threads(void)
+{
+       int is_bool, val = 0;
+
+       val = git_env_ulong("GIT_TEST_INDEX_THREADS", 0);
+       if (val)
+               return val;
+
+       if (!git_config_get_bool_or_int("index.threads", &is_bool, &val)) {
+               if (is_bool)
+                       return val ? 0 : 1;
+               else
+                       return val;
+       }
+
+       return 0; /* auto */
+}
+
 NORETURN
 void git_die_config_linenr(const char *key, const char *filename, int linenr)
 {