upload-pack: teach deepen-relative in protocol v2
[gitweb.git] / config.c
index 04286f7717645c6812c7236a282c34f5ad353eb7..ff521eb27ad243b27c7bd95f3ad7a1b777a4ae00 100644 (file)
--- a/config.c
+++ b/config.c
@@ -2294,22 +2294,25 @@ int git_config_get_fsmonitor(void)
        return 0;
 }
 
-int git_config_get_index_threads(void)
+int git_config_get_index_threads(int *dest)
 {
-       int is_bool, val = 0;
+       int is_bool, val;
 
        val = git_env_ulong("GIT_TEST_INDEX_THREADS", 0);
-       if (val)
-               return val;
+       if (val) {
+               *dest = val;
+               return 0;
+       }
 
        if (!git_config_get_bool_or_int("index.threads", &is_bool, &val)) {
                if (is_bool)
-                       return val ? 0 : 1;
+                       *dest = val ? 0 : 1;
                else
-                       return val;
+                       *dest = val;
+               return 0;
        }
 
-       return 0; /* auto */
+       return 1;
 }
 
 NORETURN