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

Function enter_remediation_workspace

atomic-cli/src/commands/workspace_txn.rs:55–65  ·  view source on GitHub ↗

Enter the explicit repair boundary for the shim remediation path. The shim remediation command is what reconciles unanchored workspaces, so it cannot require an anchored baseline; it still refuses Git-owned operations, index locks, and diverged operation heads through the typed remediation value.

(
    repository: &mut Repository,
)

Source from the content-addressed store, hash-verified

53/// operations, index locks, and diverged operation heads through the typed
54/// remediation value.
55pub(crate) fn enter_remediation_workspace(
56 repository: &mut Repository,
57) -> CliResult<Result<WorkspaceTxn, WorkspaceRemediation>> {
58 match repository
59 .begin_remediation_txn()
60 .map_err(CliError::Repository)?
61 {
62 WorkspaceTxnStart::Ready(transaction) => Ok(Ok(transaction)),
63 WorkspaceTxnStart::Remediation(remediation) => Ok(Err(remediation)),
64 }
65}
66
67/// Enter the repair boundary under an explicit effect budget (CB-13D).
68///

Callers 1

run_importMethod · 0.85

Calls 1

begin_remediation_txnMethod · 0.80

Tested by

no test coverage detected