Skip to content

Commit db8ba59

Browse files
committed
SplitStreamReader: Add lookup_external_ref()
This lets you look up a ref digest from the splitstream by index and is needed by the ostree code. Signed-off-by: Alexander Larsson <alexl@redhat.com>
1 parent ff37d48 commit db8ba59

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

crates/composefs/src/splitstream.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,11 @@ impl<ObjectID: FsVerityHashValue> SplitStreamReader<ObjectID> {
928928
self.named_refs
929929
}
930930

931+
/// Look up the digest of an external reference by index
932+
pub fn lookup_external_ref(&self, idx: usize) -> Option<&ObjectID> {
933+
self.object_refs.get(idx)
934+
}
935+
931936
fn ensure_chunk(
932937
&mut self,
933938
eof_ok: bool,

0 commit comments

Comments
 (0)