From be7537e6a9efc5cf4d5378dddfa9fcb76f9ad775 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Tue, 13 Aug 2024 11:13:54 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config.c') 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 */ -- cgit v1.2.3