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

Function git_name_order

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

Source from the content-addressed store, hash-verified

452}
453
454fn git_name_order(
455 left: &[u8],
456 left_tree: bool,
457 right: &[u8],
458 right_tree: bool,
459) -> std::cmp::Ordering {
460 let mut left = left.to_vec();
461 let mut right = right.to_vec();
462 if left_tree {
463 left.push(b'/');
464 }
465 if right_tree {
466 right.push(b'/');
467 }
468 left.cmp(&right)
469}
470
471/// Observe physical worktree state without following symlinks.
472///

Callers 1

hash_index_directoryFunction · 0.85

Calls 2

pushMethod · 0.45
cmpMethod · 0.45

Tested by

no test coverage detected