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

Function project_view_to_git

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

Project one Atomic view into its Git mirror (CB-8A RFC §8.1/§8.2). Runs the full leased pipeline for the view's HEAD policy: V1 refusal, CB-4B worktree verification, tree-object write, operation-specific projection commit with one parent, expected-old ref update, scoped HEAD placement, and index alignment to the projected tree (stage 0 only). Every step re-observes the publication leases; on any

(
    repo: &Repository,
    repo_root: &Path,
    git_repo: &GitRepository,
    view: &str,
    record_metadata: Option<RecordProjectionMetadata>,
)

Source from the content-addressed store, hash-verified

980/// Every step re-observes the publication leases; on any failure the
981/// captured Git HEAD/ref/index snapshot is restored where possible.
982pub(crate) fn project_view_to_git(
983 repo: &Repository,
984 repo_root: &Path,
985 git_repo: &GitRepository,
986 view: &str,
987 record_metadata: Option<RecordProjectionMetadata>,
988) -> CliResult<ShadowSwitchReceipt> {
989 project_view_to_git_with_conflicts(
990 repo,
991 repo_root,
992 git_repo,
993 view,
994 record_metadata,
995 false,
996 None,
997 )
998}
999
1000/// The projection path for a caller that already holds the repo-scoped
1001/// shadow-commit (common operation) boundary — the record projection nests

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected