Commands that resolve this state when a single safe path exists. Ordinary boundaries only observe Git for shim workspaces ([`Repository::shim_workspace_active`]), so these states are reached after an explicit opt-in or anchoring.
(&self)
| 796 | /// ([`Repository::shim_workspace_active`]), so these states are reached |
| 797 | /// after an explicit opt-in or anchoring. |
| 798 | pub fn remediation(&self) -> Option<String> { |
| 799 | const DISABLE: &str = "To use Atomic without the Git shim in a workspace that was never \ |
| 800 | anchored:\n atomic git shim disable"; |
| 801 | match self { |
| 802 | Self::MissingCheckpoint => Some(format!( |
| 803 | "The Git shim is enabled for this repository, but this workspace has no \ |
| 804 | verified Git baseline yet. Anchor it to the current Git HEAD (imports the Git \ |
| 805 | history into the current view):\n atomic git shim reconcile\n{DISABLE}" |
| 806 | )), |
| 807 | Self::UnbornHead { symref } => Some(format!( |
| 808 | "{symref} has no commits yet, so there is no Git baseline to anchor to. \ |
| 809 | Create the first Git commit (or switch to a branch that has commits), then \ |
| 810 | anchor the workspace:\n git add <paths> && git commit\n atomic git shim reconcile\n{DISABLE}" |
| 811 | )), |
| 812 | _ => None, |
| 813 | } |
| 814 | } |
| 815 | } |
| 816 | |
| 817 | /// Checkpoint fields needed by the entry protocol. Reading never rewrites legacy data. |