Skip to main content

pack_is_thin

Function pack_is_thin 

Source
pub fn pack_is_thin(data: &[u8], algo: HashAlgo) -> bool
Expand description

Whether data is a thin pack — i.e. it contains a ref-delta (type 7) whose base object is not itself present in the pack. git pack-objects --thin produces such packs; a receiver that rejects thin packs (receive-pack --reject-thin-pack-for-testing) uses this to refuse them.

Conservative: any parse error makes this return false (treat as non-thin) so a malformed pack is handled by the normal ingestion path rather than mislabeled.