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

Function record_shim_opt_in

atomic-cli/src/commands/git/shim.rs:803–808  ·  view source on GitHub ↗

Record the explicit shim consent in the repository configuration. Returns whether the file changed. Review R4: the CLI enable/disable action and the flag become one reachable consent/activation path. CB-13C F2: the transition is serialized under the common operation lock with an expected-old lease and an atomic file replacement — the caller's observed consent state is the lease, so a concurrent c

(root: &Path, enabled: bool)

Source from the content-addressed store, hash-verified

801/// caller's observed consent state is the lease, so a concurrent consent
802/// change refuses instead of being overwritten.
803fn record_shim_opt_in(root: &Path, enabled: bool) -> CliResult<bool> {
804 let observed = shim_config(root)?.git.shim.enabled;
805 let repo = Repository::open(root).map_err(CliError::from)?;
806 repo.set_shim_consent(enabled, Some(observed))
807 .map_err(CliError::from)
808}
809
810/// The reachable CB-13B cutover entry point: the CLI command owns the
811/// journaled cutover executor (and its typed inverse). The explicit opt-in

Callers 1

runMethod · 0.85

Calls 3

shim_configFunction · 0.85
openFunction · 0.85
set_shim_consentMethod · 0.80

Tested by

no test coverage detected