odb: get rid of the_repository in odb_mkstemp()

Get rid of our dependency on `the_repository` in `odb_mkstemp()` by
passing in the object database as a parameter and adjusting all callers.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2025-07-01 14:22:19 +02:00
committed by Junio C Hamano
parent 961038856b
commit 1b1679c688
7 changed files with 22 additions and 15 deletions

View File

@@ -1052,7 +1052,8 @@ void bitmap_writer_finish(struct bitmap_writer *writer,
struct bitmap_disk_header header;
int fd = odb_mkstemp(&tmp_file, "pack/tmp_bitmap_XXXXXX");
int fd = odb_mkstemp(writer->repo->objects, &tmp_file,
"pack/tmp_bitmap_XXXXXX");
if (writer->pseudo_merges_nr)
options |= BITMAP_OPT_PSEUDO_MERGES;