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

Function verify_shim_publication

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

Native Atomic publication is unchanged without an active Git shadow. Once the shadow marker exists, however, publication is gated fail-closed.

(
    repo: &Repository,
    repo_root: &Path,
    view: &str,
)

Source from the content-addressed store, hash-verified

262/// Native Atomic publication is unchanged without an active Git shadow. Once
263/// the shadow marker exists, however, publication is gated fail-closed.
264pub(crate) fn verify_shim_publication(
265 repo: &Repository,
266 repo_root: &Path,
267 view: &str,
268) -> CliResult<Option<VerifiedPublication>> {
269 let Ok(git_repo) = GitRepository::discover(repo_root) else {
270 return Ok(None);
271 };
272 if !shadow_sync_active(&git_repo) {
273 return Ok(None);
274 }
275 let (policy, filters) = current_conversion_policy(repo_root, &git_repo)?;
276 verify_git_publication_with_policy(repo, repo_root, view, policy, filters, true, None).map(Some)
277}
278
279fn verify_git_publication_with_policy(
280 repo: &Repository,

Callers 1

run_asyncMethod · 0.85

Calls 3

shadow_sync_activeFunction · 0.85

Tested by

no test coverage detected