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

Method resolve_against

atomic-repository/src/change_source/scan.rs:115–121  ·  view source on GitHub ↗

The identity to record for `expected`: the canonical hash when either form matches it, else the cleaned hash (a modification).

(self, expected: Hash)

Source from the content-addressed store, hash-verified

113 /// The identity to record for `expected`: the canonical hash when
114 /// either form matches it, else the cleaned hash (a modification).
115 pub fn resolve_against(self, expected: Hash) -> Hash {
116 if self.cleaned == expected || self.raw == expected {
117 expected
118 } else {
119 self.cleaned
120 }
121 }
122}
123
124#[derive(Clone, Copy, Debug, Default)]

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected