Skip to main content

blob_id

Function blob_id 

Source
pub fn blob_id(hash: Kind, content: &[u8]) -> Option<Vec<u8>>
Expand description

The object id git stores for content as a blob.

Git hashes blob <length>\0 followed by the bytes. Deterministic encryption is what makes this useful: hashing the ciphertext the clean path would produce answers “is this working-tree file already stored” exactly, without opening a single object.