pub fn parse_tree_object(
data: &[u8],
format: ObjectFormat,
) -> Result<TreeObject>Expand description
Parse a tree object from git format.
Tree entries store the referenced OID in binary form, which is not
self-describing: a SHA-1 repository uses 20-byte OIDs and a SHA-256
repository uses 32-byte OIDs. The caller must supply the repository’s
ObjectFormat — typically derived from the tree object’s own hash
(GitHash::object_format) — so the entries are sliced at the correct
width instead of a hardcoded 20.