From 3bc3177ad7a472dd5fc45cff16b8f57e5800ebc2 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Thu, 5 Mar 2026 15:19:48 +0100 Subject: odb/source: make `close()` function pluggable Introduce a new callback function in `struct odb_source` to make the function pluggable. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- odb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'odb.c') diff --git a/odb.c b/odb.c index 2cf6a53dc3..f7487eb0df 100644 --- a/odb.c +++ b/odb.c @@ -1062,10 +1062,8 @@ struct object_database *odb_new(struct repository *repo, void odb_close(struct object_database *o) { struct odb_source *source; - for (source = o->sources; source; source = source->next) { - struct odb_source_files *files = odb_source_files_downcast(source); - packfile_store_close(files->packed); - } + for (source = o->sources; source; source = source->next) + odb_source_close(source); close_commit_graph(o); } -- cgit v1.3-6-g1900