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

Function observe_workspace

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

Observe a workspace boundary while allowing forensic commands to report unsafe state.

(
    repository: &mut Repository,
)

Source from the content-addressed store, hash-verified

35
36/// Observe a workspace boundary while allowing forensic commands to report unsafe state.
37pub(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///

Callers 4

runMethod · 0.85
run_importMethod · 0.85
run_git_diffMethod · 0.85
runMethod · 0.85

Calls 1

begin_workspace_txnMethod · 0.80

Tested by

no test coverage detected