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

Function shim_workspace_active

atomic-cli/src/commands/git/guard.rs:517–524  ·  view source on GitHub ↗

Whether the working copy at `root` enrolled in the Git shim (explicit opt-in or a checkpoint written by an explicit shim command).

(root: &Path)

Source from the content-addressed store, hash-verified

515/// Whether the working copy at `root` enrolled in the Git shim (explicit
516/// opt-in or a checkpoint written by an explicit shim command).
517fn shim_workspace_active(root: &Path) -> Result<bool, GuardError> {
518 let repository = atomic_repository::Repository::open_readonly(root).map_err(|error| {
519 CheckpointError::Atomic(format!("cannot open repository read-only: {error}"))
520 })?;
521 repository
522 .shim_workspace_active()
523 .map_err(|error| CheckpointError::Atomic(error.to_string()).into())
524}
525
526/// Pure causal-baseline classifier used by every future command boundary.
527pub(crate) fn classify_guard(

Callers 1

guard_working_copyFunction · 0.85

Calls 1

shim_workspace_activeMethod · 0.80

Tested by

no test coverage detected