The actionable remediation text for a mapping status (AC-2 diagnostics).
(status: RefSyncStatus)
| 415 | |
| 416 | /// The actionable remediation text for a mapping status (AC-2 diagnostics). |
| 417 | pub(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 |