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

Function refuse_shim_command

atomic-cli/src/commands/git/linked_worktree.rs:111–116  ·  view source on GitHub ↗

`git shim` commands refuse inside an unmanaged linked worktree: one with neither a repository of its own nor the `.atomic/repository` pointer. A registered linked worktree (the sandbox-style pointer, CB-13D) adopts its own ephemeral view and reconciles like any working copy.

(path: &Path)

Source from the content-addressed store, hash-verified

109/// A registered linked worktree (the sandbox-style pointer, CB-13D) adopts
110/// its own ephemeral view and reconciles like any working copy.
111pub(crate) fn refuse_shim_command(path: &Path) -> CliResult<()> {
112 match detect_unmanaged_linked_worktree(path) {
113 Some(linked) => Err(refusal(&linked)),
114 None => Ok(()),
115 }
116}
117
118/// Native commands that reconcile through the shim refuse inside a linked
119/// worktree only when the main worktree is shim-enrolled; a repository that

Calls 2

refusalFunction · 0.70