mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
87aace129e
commit
44ebcd6254
6
rerere.c
6
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)
|
||||
|
||||
Reference in New Issue
Block a user