pub fn tree_entry_cmp(
a_name: &[u8],
a_is_tree: bool,
b_name: &[u8],
b_is_tree: bool,
) -> OrderingExpand description
Git’s tree-entry sort comparator.
Trees are sorted byte-by-byte by "<name>" for blobs and "<name>/" for
sub-trees, so a directory foo sorts after a file foo-bar but before
fooz. This matches base_name_compare in tree.c.
§Parameters
a_name: name bytes of the first entrya_is_tree: whether the first entry is a sub-tree (mode == 0o040000)b_name: name bytes of the second entryb_is_tree: whether the second entry is a sub-tree