aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/gc.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-08-23 09:02:34 -0700
committerJunio C Hamano <gitster@pobox.com>2024-08-23 09:02:34 -0700
commit5e56a39e6a9b8621e62f7a18ed027777a095dba7 (patch)
tree6c444719f16ca94fb3a001f00378974372f4c906 /builtin/gc.c
parent1b6b2bfae582e1e5a9b9ad2ef15985f69ade0fce (diff)
parent036876a106739504c9a45d17f620cc34acd2f874 (diff)
downloadgit-5e56a39e6a9b8621e62f7a18ed027777a095dba7.tar.gz
Merge branch 'ps/config-wo-the-repository'
Use of API functions that implicitly depend on the_repository object in the config subsystem has been rewritten to pass a repository object through the callchain. * ps/config-wo-the-repository: config: hide functions using `the_repository` by default global: prepare for hiding away repo-less config functions config: don't depend on `the_repository` with branch conditions config: don't have setters depend on `the_repository` config: pass repo to functions that rename or copy sections config: pass repo to `git_die_config()` config: pass repo to `git_config_get_expiry_in_days()` config: pass repo to `git_config_get_expiry()` config: pass repo to `git_config_get_max_percent_split_change()` config: pass repo to `git_config_get_split_index()` config: pass repo to `git_config_get_index_threads()` config: expose `repo_config_clear()` config: introduce missing setters that take repo as parameter path: hide functions using `the_repository` by default path: stop relying on `the_repository` in `worktree_git_path()` path: stop relying on `the_repository` when reporting garbage hooks: remove implicit dependency on `the_repository` editor: do not rely on `the_repository` for interactive edits path: expose `do_git_common_path()` as `repo_common_pathv()` path: expose `do_git_path()` as `repo_git_pathv()`
Diffstat (limited to 'builtin/gc.c')
-rw-r--r--builtin/gc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/gc.c b/builtin/gc.c
index 65be7c31b3..45f14fb09b 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -167,9 +167,9 @@ static void gc_config(void)
git_config_get_bool("gc.autodetach", &detach_auto);
git_config_get_bool("gc.cruftpacks", &cruft_packs);
git_config_get_ulong("gc.maxcruftsize", &max_cruft_size);
- git_config_get_expiry("gc.pruneexpire", &prune_expire);
- git_config_get_expiry("gc.worktreepruneexpire", &prune_worktrees_expire);
- git_config_get_expiry("gc.logexpiry", &gc_log_expire);
+ repo_config_get_expiry(the_repository, "gc.pruneexpire", &prune_expire);
+ repo_config_get_expiry(the_repository, "gc.worktreepruneexpire", &prune_worktrees_expire);
+ repo_config_get_expiry(the_repository, "gc.logexpiry", &gc_log_expire);
git_config_get_ulong("gc.bigpackthreshold", &big_pack_threshold);
git_config_get_ulong("pack.deltacachesize", &max_delta_cache_size);
@@ -463,7 +463,7 @@ static int need_to_gc(void)
else
return 0;
- if (run_hooks("pre-auto-gc"))
+ if (run_hooks(the_repository, "pre-auto-gc"))
return 0;
return 1;
}