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

Function import_direct_inode

atomic-repository/src/repository/insert.rs:891–899  ·  view source on GitHub ↗
(
    pos: &Position<Option<Hash>>,
    inode_by_pos: &HashMap<ChangePosition, Inode>,
)

Source from the content-addressed store, hash-verified

889}
890
891fn import_direct_inode(
892 pos: &Position<Option<Hash>>,
893 inode_by_pos: &HashMap<ChangePosition, Inode>,
894) -> Option<Inode> {
895 match pos.change {
896 None => inode_by_pos.get(&pos.pos).copied(),
897 _ => None,
898 }
899}
900
901fn import_direct_can_apply(change: &Change) -> bool {
902 if change.hunks().is_empty() {

Callers 1

Calls 1

getMethod · 0.65

Tested by

no test coverage detected