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

Function external_position

atomic-repository/src/repository/deferred_tree.rs:445–459  ·  view source on GitHub ↗
(
    change_hash: Hash,
    position: Position<Option<Hash>>,
)

Source from the content-addressed store, hash-verified

443}
444
445fn external_position(
446 change_hash: Hash,
447 position: Position<Option<Hash>>,
448) -> Result<Position<Hash>, RepositoryError> {
449 let change = match position.change {
450 None => change_hash,
451 Some(hash) if hash == Hash::NONE => {
452 return Err(RepositoryError::InvalidOperation {
453 message: "tree operation inode cannot reference ROOT".to_string(),
454 });
455 }
456 Some(hash) => hash,
457 };
458 Ok(Position::new(change, position.pos))
459}
460
461fn current_path_for_position<T: GraphTxnT + TreeTxnT>(
462 txn: &T,

Callers 2

collect_tree_opsFunction · 0.85
plan_tree_projectionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected