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

Function status_for

atomic-repository/src/repository/ref_mapping/decision.rs:93–101  ·  view source on GitHub ↗

The status the mapping carries when `action` has been executed (or refused). Diverged/Unrepresentable persist their status; successful reconciliation returns both sides to `Synchronized`.

(action: ThreeWayAction)

Source from the content-addressed store, hash-verified

91/// refused). Diverged/Unrepresentable persist their status; successful
92/// reconciliation returns both sides to `Synchronized`.
93pub fn status_for(action: ThreeWayAction) -> RefSyncStatus {
94 match action {
95 ThreeWayAction::Noop | ThreeWayAction::Import | ThreeWayAction::Export => {
96 RefSyncStatus::Synchronized
97 }
98 ThreeWayAction::Diverged => RefSyncStatus::Diverged,
99 ThreeWayAction::Unrepresentable => RefSyncStatus::Unrepresentable,
100 }
101}
102
103#[cfg(test)]
104mod tests {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected