diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-08-13 11:13:54 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-08-13 10:01:03 -0700 |
| commit | be7537e6a9efc5cf4d5378dddfa9fcb76f9ad775 (patch) | |
| tree | e60a95654aba8fd335dfc49173afb03dd4ae8fbf /config.c | |
| parent | 1870cc30d4c0652ac97e75035c5cb43d7caebbfa (diff) | |
| download | git-be7537e6a9efc5cf4d5378dddfa9fcb76f9ad775.tar.gz | |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 */ |
