]> Kevux Git Server - rit/commit
pack-revindex: stop depending on `the_repository`
authorPatrick Steinhardt <ps@pks.im>
Mon, 10 Mar 2025 07:13:25 +0000 (08:13 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Mar 2025 20:16:19 +0000 (13:16 -0700)
commite5957ca321802339c9710acadae2138262701e5d
tree9b24af5ef3d53c2d7e3a0c2b27285317eec4534a
parent7ebf19ce55ebfddd152aab6ddcc6559bba378aec
pack-revindex: stop depending on `the_repository`

There are multiple sites in "pack-revindex.c" where we use the global
`the_repository` variable, either explicitly or implicitly by using
`the_hash_algo`. In all of those cases we already have a repository
available in the calling context though.

Refactor the code to instead use the caller-provided repository and
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-revindex.c