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

Function projection_signature

atomic-cli/src/commands/git/shim.rs:1588–1596  ·  view source on GitHub ↗

The projection commit's committer signature: Git config first, then the repository's configured default author, then the system identity. The projection commits are DERIVED artifacts of Atomic's verified state — with no Git config (a fresh machine or an isolated test HOME) they must not refuse; they commit as the system rather than fabricating user attribution (review CB-9C hermeticity).

(
    git: &GitRepository,
)

Source from the content-addressed store, hash-verified

1586/// not refuse; they commit as the system rather than fabricating user
1587/// attribution (review CB-9C hermeticity).
1588pub(crate) fn projection_signature(
1589 git: &GitRepository,
1590) -> Result<git2::Signature<'static>, CliError> {
1591 if let Ok(signature) = git.signature() {
1592 return Ok(signature);
1593 }
1594 git2::Signature::now("atomic", "atomic@invalid")
1595 .map_err(|error| git_error(format!("cannot build the projection signature: {error}")))
1596}
1597
1598fn git_head_paths(git: &GitRepository) -> CliResult<BTreeSet<String>> {
1599 let tree = git

Callers 2

project_atomic_to_gitFunction · 0.85

Calls 2

signatureMethod · 0.80
git_errorFunction · 0.70

Tested by

no test coverage detected