]> git.ipfire.org Git - thirdparty/git.git/commit
pack-bitmap: load writer config from repository parameter
authorJeff King <peff@peff.net>
Sat, 17 Aug 2024 07:26:53 +0000 (03:26 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sat, 17 Aug 2024 16:44:40 +0000 (09:44 -0700)
commitecc6fa9ae964daf333f5e64cdff6f5232139f440
tree7286edf9d96ee7a309224ea2aed91e48ceaf789f
parent65e7a4478c202734b604662bad739adedeb6dfca
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>
pack-bitmap-write.c
pseudo-merge.c
pseudo-merge.h