streaming: move logic to read packed objects streams into backend

Move the logic to read packed object streams into the respective
subsystem.

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-23 19:59:41 +01:00
committed by Junio C Hamano
parent bc30a2f5df
commit 8c1b84bc97
3 changed files with 134 additions and 135 deletions

View File

@@ -8,6 +8,7 @@
/* in odb.h */
struct object_info;
struct odb_read_stream;
struct packed_git {
struct hashmap_entry packmap_ent;
@@ -144,6 +145,10 @@ void packfile_store_add_pack(struct packfile_store *store,
#define repo_for_each_pack(repo, p) \
for (p = packfile_store_get_packs(repo->objects->packfiles); p; p = p->next)
int packfile_store_read_object_stream(struct odb_read_stream **out,
struct packfile_store *store,
const struct object_id *oid);
/*
* Try to read the object identified by its ID from the object store and
* populate the object info with its data. Returns 1 in case the object was