Skip to main content

assemble_identity

Function assemble_identity 

Source
pub fn assemble_identity(
    name: &str,
    email: &str,
    date_override: Option<&str>,
    now: OffsetDateTime,
) -> String
Expand description

Assemble a commit identity line (Name <email> <epoch> <offset>) from an already-resolved name and email plus a timestamp.

date_override is the raw value of a GIT_AUTHOR_DATE / GIT_COMMITTER_DATE-style environment variable, if set: it is parsed with parse_date_to_git_timestamp and used verbatim if parsing fails (matching Git’s lenient behavior). When None, now is formatted instead.