Skip to main content

materialize_entry

Function materialize_entry 

Source
pub fn materialize_entry(
    pack: &[u8],
    w: &PackWalk,
    entry: usize,
    oid_len: usize,
    offset_of_oid: &dyn Fn(&[u8]) -> Option<u64>,
    bases: &dyn BaseSource,
) -> Result<(GitObjectKind, Vec<u8>)>
Expand description

One object’s content from a pack and an entry, with only its chain inflated — the lazy read path. offset_of_oid answers a REF_DELTA base that is inside the pack (its entry offset); bases answers one that is not. Nothing is cached: a chain of depth d costs d inflates and d−1 delta applications, and nothing else.