odb/source-packed: wire up for_each_object() callback

Move `packfile_store_for_each_object()` and its associated helpers from
"packfile.c" into "odb/source-packed.c" and wire it up as the
`for_each_object()` callback of the "packed" source.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2026-06-17 08:39:54 +02:00
committed by Junio C Hamano
parent 83f3a2b91b
commit 7ed53cde28
7 changed files with 269 additions and 280 deletions

View File

@@ -2016,8 +2016,8 @@ static void fill_oids_from_all_packs(struct write_commit_graph_context *ctx)
odb_prepare_alternates(ctx->r->objects);
for (source = ctx->r->objects->sources; source; source = source->next) {
struct odb_source_files *files = odb_source_files_downcast(source);
packfile_store_for_each_object(files->packed, &oi, add_packed_commits_oi,
ctx, &opts);
odb_source_for_each_object(&files->packed->base, &oi, add_packed_commits_oi,
ctx, &opts);
}
if (ctx->progress_done < ctx->approx_nr_objects)