]> git.ipfire.org Git - thirdparty/git.git/commit
odb: get rid of `the_repository` when handling the primary source
authorPatrick Steinhardt <ps@pks.im>
Tue, 1 Jul 2025 12:22:22 +0000 (14:22 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 1 Jul 2025 21:46:36 +0000 (14:46 -0700)
commit7eafd4472d7c273e10a408da6662ca9d4b9800fd
treebbfa21372fcbef1e66f7cb6a5c08f2c83b7ecf95
parent798c661ce39f7d5297fa7ea8928ae464b6d5dd95
odb: get rid of `the_repository` when handling the primary source

The functions `set_temporary_primary_odb()` and `restore_primary_odb()`
are responsible for managing a temporary primary source for the
database. Both of these functions implicitly rely on `the_repository`.

Refactor them to instead take an explicit object database parameter as
argument and adjust callers. Rename the functions accordingly.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
odb.c
odb.h
tmp-objdir.c