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

Function install_fetched_bindings

atomic-cli/src/commands/git/bootstrap.rs:157–161  ·  view source on GitHub ↗

Install every fetched binding ref into the immutable local store after full revalidation. Returns the number of newly stored bindings. Fail-closed contract (RFC §5.2, §12): a ref whose binding bytes are undecodable, whose signature fails, or whose bound commit/tree OIDs do not match the live Git ODB **aborts the whole installation** — no partial install, no silent skip of a tampered binding.

(repo: &Repository, git: &GitRepository)

Source from the content-addressed store, hash-verified

155/// not match the live Git ODB **aborts the whole installation** — no
156/// partial install, no silent skip of a tampered binding.
157pub(crate) fn install_fetched_bindings(repo: &Repository, git: &GitRepository) -> CliResult<usize> {
158 let refs = atomic_repository::git_binding::transferable_binding_refs(git)
159 .map_err(|error| CliError::GitError { message: error })?;
160 install_binding_refs(repo, git, refs)
161}
162
163/// CB-10B review R9: the DEGRADED namespace (`refs/heads/atomic/bindings/*`)
164/// installs through the SAME fail-closed validation as the primary

Callers 1

adopt_git_checkoutFunction · 0.85

Calls 2

install_binding_refsFunction · 0.85

Tested by

no test coverage detected