Skip to main content

name_order

Function name_order 

Source
pub fn name_order(
    a: &[u8],
    a_is_tree: bool,
    b: &[u8],
    b_is_tree: bool,
) -> Ordering
Expand description

Compare entry names according to Git’s canonical tree ordering.

Trees compare as if their name had a trailing /, whereas non-tree entries compare as if their name ended in a NUL byte. This distinction matters when one name is a prefix of another.