odb: adopt logic to close object databases

The logic to close an object database is currently contained in the
packfile subsystem. That choice is somewhat relatable, as most of the
logic really is to close resources associated with the packfile store
itself. But we also end up handling object sources and commit graphs,
which certainly is not related to packfiles.

Move the function into the object database subsystem and rename it to
`odb_close()`.

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-11-19 08:50:51 +01:00
committed by Junio C Hamano
parent 7c188a9e45
commit 9aaba57993
10 changed files with 30 additions and 23 deletions

View File

@@ -743,7 +743,7 @@ fail_pipe:
fflush(NULL);
if (cmd->close_object_store)
close_object_store(the_repository->objects);
odb_close(the_repository->objects);
#ifndef GIT_WINDOWS_NATIVE
{