Skip to main content

serialize_tree

Function serialize_tree 

Source
pub fn serialize_tree(entries: &[TreeEntry]) -> Vec<u8> ⓘ
Expand description

Build the raw bytes of a tree object from a slice of entries.

Entries must already be sorted in Git tree order (see tree_entry_cmp), with unique, valid names and modes; nothing here checks that. To write a tree from entries in any order with validation, use Objects::write_tree.