diff options
author | Jeff King <peff@peff.net> | 2024-08-17 09:26:53 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-17 18:44:40 +0200 |
commit | ecc6fa9ae964daf333f5e64cdff6f5232139f440 (patch) | |
tree | 7286edf9d96ee7a309224ea2aed91e48ceaf789f /pseudo-merge.c | |
parent | refs: drop some unused parameters from create_symref_lock() (diff) | |
download | git-ecc6fa9ae964daf333f5e64cdff6f5232139f440.tar.xz git-ecc6fa9ae964daf333f5e64cdff6f5232139f440.zip |
pack-bitmap: load writer config from repository parameter
In bitmap_writer_init(), we take a repository parameter but ever look at
it. Most of the initialization here is independent of the repository,
but we do load some config. So let's pass the repo we get down to
load_pseudo_merges_from_config(), which in turn can use repo_config(),
rather than depending on the_repository via git_config().
The outcome is the same, since all callers pass in the_repository
anyway. But it takes us a step closer to getting rid of the global, and
as a bonus it silences an unused parameter warning.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pseudo-merge.c')
-rw-r--r-- | pseudo-merge.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pseudo-merge.c b/pseudo-merge.c index 77a83b9c5c..1d7f5381a4 100644 --- a/pseudo-merge.c +++ b/pseudo-merge.c @@ -183,11 +183,12 @@ done: return ret; } -void load_pseudo_merges_from_config(struct string_list *list) +void load_pseudo_merges_from_config(struct repository *r, + struct string_list *list) { struct string_list_item *item; - git_config(pseudo_merge_config, list); + repo_config(r, pseudo_merge_config, list); for_each_string_list_item(item, list) { struct pseudo_merge_group *group = item->util; |