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

Function resolve_trunk

atomic-repository/src/repository/semantic_closure.rs:190–196  ·  view source on GitHub ↗

A trunk id recorded relative to its own change resolves to that change.

(change_id: NodeId, raw: TrunkId)

Source from the content-addressed store, hash-verified

188
189/// A trunk id recorded relative to its own change resolves to that change.
190fn resolve_trunk(change_id: NodeId, raw: TrunkId) -> TrunkId {
191 if raw.change_id().is_root() {
192 TrunkId::new(change_id, raw.file_idx())
193 } else {
194 raw
195 }
196}
197
198/// A branch id recorded relative to its own change resolves to that change.
199fn resolve_branch(change_id: NodeId, raw: BranchId) -> BranchId {

Callers 1

foldMethod · 0.85

Calls 3

file_idxMethod · 0.80
is_rootMethod · 0.45
change_idMethod · 0.45

Tested by

no test coverage detected