]> git.ipfire.org Git - thirdparty/git.git/commit
t/helper: stop setting up `the_repository` repeatedly
authorPatrick Steinhardt <ps@pks.im>
Wed, 19 Nov 2025 07:50:56 +0000 (08:50 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 25 Nov 2025 20:16:00 +0000 (12:16 -0800)
commiteea83c010cf431325a05f06cc7c64029538c8495
tree95059840542efb8914fd2108addee921077042f9
parent8dc22e87f000a092b62b4fb08e2542433f1ae192
t/helper: stop setting up `the_repository` repeatedly

The "repository" test helper sets up `the_repository` twice. In fact
though, we don't even have to set it up even once: all we need is to set
up its hash algorithm, because we still depend on some subsystems that
aren't free of `the_repository`.

Refactor the code accordingly. This prepares for a subsequent change,
where setting up the repository repeatedly will lead to a `BUG()`.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-repository.c