Persist the `Diverged` status without moving either side (RFC §8.5).
(
repo: &Repository,
working_copy: WorkingCopyId,
mapping: &RefMapping,
)
| 395 | |
| 396 | /// Persist the `Diverged` status without moving either side (RFC §8.5). |
| 397 | pub(crate) fn persist_diverged_status( |
| 398 | repo: &Repository, |
| 399 | working_copy: WorkingCopyId, |
| 400 | mapping: &RefMapping, |
| 401 | ) -> CliResult<()> { |
| 402 | let mut diverged = mapping.clone(); |
| 403 | diverged.status = RefSyncStatus::Diverged; |
| 404 | // Pinned to the classified row: a concurrent mapping move must not be |
| 405 | // clobbered by this status write (CB-10A review R6). |
| 406 | repo.set_ref_mapping_from_observation( |
| 407 | working_copy, |
| 408 | &mapping.view_name, |
| 409 | Some(mapping), |
| 410 | Some(diverged), |
| 411 | ) |
| 412 | .map_err(CliError::from)?; |
| 413 | Ok(()) |
| 414 | } |
| 415 | |
| 416 | /// The actionable remediation text for a mapping status (AC-2 diagnostics). |
| 417 | pub(crate) fn remediation_for(status: RefSyncStatus) -> &'static str { |
no test coverage detected