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

Function shim_private_path

atomic-repository/src/repository/project_tree.rs:362–368  ·  view source on GitHub ↗

Whether `path` is shim-private state under [`ExclusionPolicy::ShimPrivate`] — deliberately absent from project manifests while tracked alive in the Atomic view. This is exactly the path set [`ExclusionPolicy::ShimPrivate::exclusion`] rejects: Atomic private state (`.atomic*`) plus the vault (`.vault/`), whose files a colocated repository legitimately tracks in both Git and the graph. Staged verifi

(path_bytes: &[u8])

Source from the content-addressed store, hash-verified

360/// half, or importing a repository that tracks `.vault/` files refuses with
361/// "staged path ... is present but the commit tree does not hold it".
362pub fn shim_private_path(path_bytes: &[u8]) -> bool {
363 let first = path_bytes
364 .split(|byte| *byte == b'/')
365 .next()
366 .unwrap_or_default();
367 first == b".atomic" || path_bytes == b".atomicignore" || first == b".vault"
368}
369
370#[derive(Clone, Copy, Debug, PartialEq, Eq)]
371pub enum LossPolicy {

Callers 1

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected