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

Function import_direct_source

atomic-repository/src/repository/insert.rs:880–889  ·  view source on GitHub ↗
(
    pos: &Position<Option<Hash>>,
    by_end: &HashMap<ChangePosition, GraphNode<NodeId>>,
)

Source from the content-addressed store, hash-verified

878);
879
880fn import_direct_source(
881 pos: &Position<Option<Hash>>,
882 by_end: &HashMap<ChangePosition, GraphNode<NodeId>>,
883) -> Option<GraphNode<NodeId>> {
884 match pos.change {
885 Some(hash) if hash == Hash::NONE => Some(GraphNode::root()),
886 None => by_end.get(&pos.pos).copied(),
887 _ => None,
888 }
889}
890
891fn import_direct_inode(
892 pos: &Position<Option<Hash>>,

Callers 1

Calls 2

rootFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected