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

Method expected_old

atomic-repository/src/repository/adoption.rs:833–842  ·  view source on GitHub ↗

The proven observation for `path` — its only legal expected-old value.

(&self, path: &str)

Source from the content-addressed store, hash-verified

831impl ProvenWorktree {
832 /// The proven observation for `path` — its only legal expected-old value.
833 fn expected_old(&self, path: &str) -> Result<EffectValue, AdoptKnownEditError> {
834 self.observations.get(path).cloned().ok_or_else(|| {
835 AdoptKnownEditError::Repository(RepositoryError::InvalidOperation {
836 message: format!(
837 "the pre-adoption proof did not observe carried path '{path}'; \
838 refusing to plan a lease from an unproven observation"
839 ),
840 })
841 })
842 }
843}
844
845impl Repository {

Callers 1

Calls 2

RepositoryClass · 0.85
getMethod · 0.65

Tested by

no test coverage detected