summaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-08-13 11:13:59 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-13 19:01:03 +0200
commit87aace129ef39fc52ca26e8d31c356c8d05ea910 (patch)
treeb058e5e73f83b9fe65773fc2189a10f195163154 /config.c
parentconfig: pass repo to `git_config_get_max_percent_split_change()` (diff)
downloadgit-87aace129ef39fc52ca26e8d31c356c8d05ea910.tar.xz
git-87aace129ef39fc52ca26e8d31c356c8d05ea910.zip
config: pass repo to `git_config_get_expiry()`
Refactor `git_config_get_expiry()` 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 f1d2fb6d4c..4138dc50ce 100644
--- a/config.c
+++ b/config.c
@@ -2766,9 +2766,9 @@ int git_config_get_pathname(const char *key, char **dest)
return repo_config_get_pathname(the_repository, key, dest);
}
-int git_config_get_expiry(const char *key, const char **output)
+int repo_config_get_expiry(struct repository *r, const char *key, const char **output)
{
- int ret = git_config_get_string(key, (char **)output);
+ int ret = repo_config_get_string(r, key, (char **)output);
if (ret)
return ret;
if (strcmp(*output, "now")) {