MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / git_tree_name_cmp

Function git_tree_name_cmp

atomic-repository/src/repository/project_tree.rs:1096–1106  ·  view source on GitHub ↗
(left: &[u8], left_tree: bool, right: &[u8], right_tree: bool)

Source from the content-addressed store, hash-verified

1094}
1095
1096fn git_tree_name_cmp(left: &[u8], left_tree: bool, right: &[u8], right_tree: bool) -> Ordering {
1097 let mut left = left.to_vec();
1098 let mut right = right.to_vec();
1099 if left_tree {
1100 left.push(b'/');
1101 }
1102 if right_tree {
1103 right.push(b'/');
1104 }
1105 left.cmp(&right)
1106}
1107
1108fn parse_tree_entries(
1109 bytes: &[u8],

Callers 2

parse_treeMethod · 0.85
write_directoryFunction · 0.85

Calls 2

pushMethod · 0.45
cmpMethod · 0.45

Tested by

no test coverage detected