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

Function projection_author

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

§5.5 identity resolution for projected commits: Atomic identity first, then the configured `[git.identity]` mapping, then a deterministic foreign DID.

(
    repo: &Repository,
    repo_root: &Path,
    fallback_name: Option<&str>,
    fallback_email: Option<&str>,
)

Source from the content-addressed store, hash-verified

1713/// then the configured `[git.identity]` mapping, then a deterministic
1714/// foreign DID.
1715pub(crate) fn projection_author(
1716 repo: &Repository,
1717 repo_root: &Path,
1718 fallback_name: Option<&str>,
1719 fallback_email: Option<&str>,
1720) -> atomic_repository::ProjectionAuthor {
1721 let (name, email) = identity_author().unwrap_or_else(|| {
1722 (
1723 fallback_name.unwrap_or("Atomic").to_string(),
1724 fallback_email.unwrap_or("atomic@localhost").to_string(),
1725 )
1726 });
1727 let did = identity_map(repo, repo_root).did_for_email(&email);
1728 atomic_repository::ProjectionAuthor {
1729 name,
1730 email,
1731 did,
1732 agent_did: None,
1733 }
1734}
1735
1736fn identity_author() -> Option<(String, String)> {
1737 use atomic_identity::IdentityStore;

Callers 2

build_commit_messageMethod · 0.85
build_switch_projectionFunction · 0.85

Calls 3

identity_authorFunction · 0.85
identity_mapFunction · 0.85
did_for_emailMethod · 0.45

Tested by

no test coverage detected