Observe a workspace boundary while allowing forensic commands to report unsafe state.
(
repository: &mut Repository,
)
| 35 | |
| 36 | /// Observe a workspace boundary while allowing forensic commands to report unsafe state. |
| 37 | pub(crate) fn observe_workspace( |
| 38 | repository: &mut Repository, |
| 39 | ) -> CliResult<Result<WorkspaceTxn, WorkspaceRemediation>> { |
| 40 | match repository |
| 41 | .begin_workspace_txn(WorkspaceTxnMode::Observe) |
| 42 | .map_err(CliError::Repository)? |
| 43 | { |
| 44 | WorkspaceTxnStart::Ready(transaction) => Ok(Ok(transaction)), |
| 45 | WorkspaceTxnStart::Remediation(remediation) => Ok(Err(remediation)), |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | /// Enter the explicit repair boundary for the shim remediation path. |
| 50 | /// |
no test coverage detected