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

There are multiple sites in "pack-check.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-check.c