summaryrefslogtreecommitdiffstats
path: root/rerere.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-08-13 11:14:03 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-13 19:01:03 +0200
commit44ebcd6254ce9e42eeaa70b67750efb356157914 (patch)
tree78a0c010f979cd2a3cdc5a03cb3f61821c962633 /rerere.c
parentconfig: pass repo to `git_config_get_expiry()` (diff)
downloadgit-44ebcd6254ce9e42eeaa70b67750efb356157914.tar.xz
git-44ebcd6254ce9e42eeaa70b67750efb356157914.zip
config: pass repo to `git_config_get_expiry_in_days()`
Refactor `git_config_get_expiry_in_days()` 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 'rerere.c')
-rw-r--r--rerere.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/rerere.c b/rerere.c
index 3a3888cce2..578a4fe378 100644
--- a/rerere.c
+++ b/rerere.c
@@ -1203,8 +1203,10 @@ void rerere_gc(struct repository *r, struct string_list *rr)
if (setup_rerere(r, rr, 0) < 0)
return;
- git_config_get_expiry_in_days("gc.rerereresolved", &cutoff_resolve, now);
- git_config_get_expiry_in_days("gc.rerereunresolved", &cutoff_noresolve, now);
+ repo_config_get_expiry_in_days(the_repository, "gc.rerereresolved",
+ &cutoff_resolve, now);
+ repo_config_get_expiry_in_days(the_repository, "gc.rerereunresolved",
+ &cutoff_noresolve, now);
git_config(git_default_config, NULL);
dir = opendir(git_path("rr-cache"));
if (!dir)