]> git.ipfire.org Git - thirdparty/git.git/commit
pack-bitmap-write: stop depending on `the_repository`
authorPatrick Steinhardt <ps@pks.im>
Mon, 10 Mar 2025 07:13:26 +0000 (08:13 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Mar 2025 20:16:19 +0000 (13:16 -0700)
commit1a6768d1dd6d92b34f25507091ff0775371e19cb
treec9903d22cae345b8e0efe2f36345f656c3838ef8
parente5957ca321802339c9710acadae2138262701e5d
pack-bitmap-write: stop depending on `the_repository`

There are multiple sites in "pack-bitmap-write.c" where we use the
global `the_repository` variable, either explicitly or implicitly by
using `the_hash_algo`.

Refactor the code so that the `struct bitmap_writer` stores the
repository it is getting initialized with. Like this, we can adapt
callsites that use `the_repository` to instead use the repository
provided by the writer.

Remove the `USE_THE_REPOSITORY_VARIABLE` define.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pack-bitmap-write.c
pack-bitmap.h