aboutsummaryrefslogtreecommitdiff
path: root/odb.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-03-05 15:19:48 +0100
committerJunio C Hamano <gitster@pobox.com>2026-03-05 11:45:15 -0800
commit3bc3177ad7a472dd5fc45cff16b8f57e5800ebc2 (patch)
treede69cb8d12c523123cbe61a6bb0e069811f269a7 /odb.c
parent05151cf3602d5ebaaa4e04c415e8481cb1c7ddf6 (diff)
downloadgit-3bc3177ad7a472dd5fc45cff16b8f57e5800ebc2.tar.xz
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 <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'odb.c')
-rw-r--r--odb.c6
1 files changed, 2 insertions, 4 deletions
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);
}