]> git.ipfire.org Git - thirdparty/git.git/commit
packfile: expose function to read object stream for an offset
authorPatrick Steinhardt <ps@pks.im>
Mon, 23 Feb 2026 16:00:08 +0000 (17:00 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 Feb 2026 21:19:00 +0000 (13:19 -0800)
commit41b42e3527eb6b0ab4b557d16adedcd255c9045f
tree916bdf50be62483846844eaf2efa662d7fe99ebb
parent10a6762719f612bb5edc554e62239a744bbc4283
packfile: expose function to read object stream for an offset

The function `packfile_store_read_object_stream()` takes as input an
object ID and then constructs a `struct odb_read_stream` from it. In a
subsequent commit we'll want to create an object stream for a given
combination of packfile and offset though, which is not something that
can currently be done.

Extract a new function `packfile_read_object_stream()` that makes this
functionality available.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
packfile.c
packfile.h