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

Function projection_author

atomic-cli/src/commands/git/shadow.rs:1903–1922  ·  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

1901/// then the configured `[git.identity]` mapping, then a deterministic
1902/// foreign DID.
1903pub(crate) fn projection_author(
1904 repo: &Repository,
1905 repo_root: &Path,
1906 fallback_name: Option<&str>,
1907 fallback_email: Option<&str>,
1908) -> atomic_repository::ProjectionAuthor {
1909 let (name, email) = identity_author().unwrap_or_else(|| {
1910 (
1911 fallback_name.unwrap_or("Atomic").to_string(),
1912 fallback_email.unwrap_or("atomic@localhost").to_string(),
1913 )
1914 });
1915 let did = identity_map(repo, repo_root).did_for_email(&email);
1916 atomic_repository::ProjectionAuthor {
1917 name,
1918 email,
1919 did,
1920 agent_did: None,
1921 }
1922}
1923
1924fn identity_author() -> Option<(String, String)> {
1925 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