summaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-08-13 11:13:54 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-13 19:01:03 +0200
commitbe7537e6a9efc5cf4d5378dddfa9fcb76f9ad775 (patch)
treee60a95654aba8fd335dfc49173afb03dd4ae8fbf /config.c
parentconfig: pass repo to `git_config_get_index_threads()` (diff)
downloadgit-be7537e6a9efc5cf4d5378dddfa9fcb76f9ad775.tar.xz
git-be7537e6a9efc5cf4d5378dddfa9fcb76f9ad775.zip
config: pass repo to `git_config_get_split_index()`
Refactor `git_config_get_split_index()` 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 387c7282e9..89fb7ce6b1 100644
--- a/config.c
+++ b/config.c
@@ -2801,11 +2801,11 @@ int git_config_get_expiry_in_days(const char *key, timestamp_t *expiry, timestam
return -1; /* thing exists but cannot be parsed */
}
-int git_config_get_split_index(void)
+int repo_config_get_split_index(struct repository *r)
{
int val;
- if (!git_config_get_maybe_bool("core.splitindex", &val))
+ if (!repo_config_get_maybe_bool(r, "core.splitindex", &val))
return val;
return -1; /* default value */