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

Function shim_workspace_enrolled

atomic-cli/src/commands/git/shadow.rs:1914–1917  ·  view source on GitHub ↗

Whether the working copy at `root` participates in the colocated Git shim: a verified checkpoint (written by an explicit shim command) or the explicit `[git.shim] enabled` opt-in (RFC §2 / CB-13C). A `.git` directory next to `.atomic` — with or without a retained shadow exclude line — is not consent.

(root: &Path)

Source from the content-addressed store, hash-verified

1912/// directory next to `.atomic` — with or without a retained shadow exclude
1913/// line — is not consent.
1914pub(crate) fn shim_workspace_enrolled(root: &Path) -> CliResult<bool> {
1915 let repo = Repository::open_readonly(root).map_err(CliError::Repository)?;
1916 repo.shim_workspace_active().map_err(CliError::Repository)
1917}
1918
1919/// Acquire the repo-scoped shadow-commit lock, or return `None` (a no-op skip)
1920/// if a shadow materialize/commit is already in flight (SPEC §4.3 / Principle 5).

Callers 1

checkpoint_shadow_switchFunction · 0.85

Calls 1

shim_workspace_activeMethod · 0.80

Tested by

no test coverage detected