aboutsummaryrefslogtreecommitdiff
path: root/packfile.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-11-19 08:50:51 +0100
committerJunio C Hamano <gitster@pobox.com>2025-11-19 17:41:03 -0800
commit9aaba579932781c74f67d6cecddaad59f0daaaef (patch)
tree4f6d5291108a35b571e1315c31750a9386c0d8d9 /packfile.c
parent7c188a9e45405ff911b81a5dd9029f4e91fb338e (diff)
downloadgit-9aaba579932781c74f67d6cecddaad59f0daaaef.tar.xz
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>
Diffstat (limited to 'packfile.c')
-rw-r--r--packfile.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/packfile.c b/packfile.c
index 40f733dd23..af71eaf7e3 100644
--- a/packfile.c
+++ b/packfile.c
@@ -359,21 +359,6 @@ void close_pack(struct packed_git *p)
oidset_clear(&p->bad_objects);
}
-void close_object_store(struct object_database *o)
-{
- struct odb_source *source;
-
- packfile_store_close(o->packfiles);
-
- for (source = o->sources; source; source = source->next) {
- if (source->midx)
- close_midx(source->midx);
- source->midx = NULL;
- }
-
- close_commit_graph(o);
-}
-
void unlink_pack_path(const char *pack_name, int force_delete)
{
static const char *exts[] = {".idx", ".pack", ".rev", ".keep", ".bitmap", ".promisor", ".mtimes"};