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

Function resolve_overlay_creation

atomic-cli/src/commands/view/new.rs:492–500  ·  view source on GitHub ↗

Resolve how a new view is anchored and seeded (dev #200 overlay model). Returns `(anchor, seed)`: the overlay-chain anchor view and the view whose change-set membership seeds the new view's filter.

(
    from: Option<&str>,
    parent: Option<&str>,
)

Source from the content-addressed store, hash-verified

490/// Returns `(anchor, seed)`: the overlay-chain anchor view and the view whose
491/// change-set membership seeds the new view's filter.
492pub fn resolve_overlay_creation(
493 from: Option<&str>,
494 parent: Option<&str>,
495) -> (Option<String>, Option<String>) {
496 // --from anchors on its source unless an explicit --parent overrides;
497 // the seed is always the --from source.
498 let anchor = parent.or(from).map(|s| s.to_string());
499 (anchor, from.map(|s| s.to_string()))
500}
501
502// Tes
503#[cfg(test)]

Callers 2

runMethod · 0.85

Calls

no outgoing calls

Tested by 1