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

Function remediation_for

atomic-cli/src/commands/git/ref_mapping.rs:417–433  ·  view source on GitHub ↗

The actionable remediation text for a mapping status (AC-2 diagnostics).

(status: RefSyncStatus)

Source from the content-addressed store, hash-verified

415
416/// The actionable remediation text for a mapping status (AC-2 diagnostics).
417pub(crate) fn remediation_for(status: RefSyncStatus) -> &'static str {
418 match status {
419 RefSyncStatus::Diverged => {
420 "resolve with 'atomic view insert' from the other side or 'git merge', then re-run 'atomic git shim reconcile'"
421 }
422 RefSyncStatus::GitAhead => {
423 "run 'atomic git shim reconcile' to import the Git movement"
424 }
425 RefSyncStatus::AtomicAhead => {
426 "run 'atomic git shim reconcile' to export the Atomic projection"
427 }
428 RefSyncStatus::Synchronized => "no action needed",
429 RefSyncStatus::Unrepresentable => {
430 "the view no longer maps to a Git ref; republish via 'atomic git shim publish' or 'git switch -c'"
431 }
432 }
433}
434
435/// Surface persisted ref-mapping divergence in `atomic status` (CB-10A AC-2):
436/// an actionable Diverged/Unrepresentable warning with explicit insert/merge

Callers 1

run_statusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected