aboutsummaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-08-13 11:13:49 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-13 10:01:02 -0700
commit1870cc30d4c0652ac97e75035c5cb43d7caebbfa (patch)
tree4fb31822550cbe20292d4d262c5ac1ce26026307 /config.c
parent2ea853646807f36ccd8d5c8e30b146c33f4ca3eb (diff)
downloadgit-1870cc30d4c0652ac97e75035c5cb43d7caebbfa.tar.gz
config: pass repo to `git_config_get_index_threads()`
Refactor `git_config_get_index_threads()` to accept a `struct repository` such that we can get rid of the implicit dependency on `the_repository`. Rename the function accordingly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.c')
-rw-r--r--config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/config.c b/config.c
index 476cd73c9e..387c7282e9 100644
--- a/config.c
+++ b/config.c
@@ -2826,7 +2826,7 @@ int git_config_get_max_percent_split_change(void)
return -1; /* default value */
}
-int git_config_get_index_threads(int *dest)
+int repo_config_get_index_threads(struct repository *r, int *dest)
{
int is_bool, val;
@@ -2836,7 +2836,7 @@ int git_config_get_index_threads(int *dest)
return 0;
}
- if (!git_config_get_bool_or_int("index.threads", &is_bool, &val)) {
+ if (!repo_config_get_bool_or_int(r, "index.threads", &is_bool, &val)) {
if (is_bool)
*dest = val ? 0 : 1;
else