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:1118–1128  ·  view source on GitHub ↗
(left: &[u8], left_tree: bool, right: &[u8], right_tree: bool)

Source from the content-addressed store, hash-verified

1116}
1117
1118fn git_tree_name_cmp(left: &[u8], left_tree: bool, right: &[u8], right_tree: bool) -> Ordering {
1119 let mut left = left.to_vec();
1120 let mut right = right.to_vec();
1121 if left_tree {
1122 left.push(b'/');
1123 }
1124 if right_tree {
1125 right.push(b'/');
1126 }
1127 left.cmp(&right)
1128}
1129
1130fn parse_tree_entries(
1131 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