The Ledger::create method currently uses self.signature() (the repo's git config) for both author and committer with no way to override them. For import use cases — e.g. syncing issues from GitHub into a local forge store — it's necessary to preserve original authorship and timestamp on the resulting commit.
Proposed API
fn create_with_author(
&self,
ref_prefix: &str,
strategy: &IdStrategy<'_>,
fields: &[(&str, &[u8])],
message: &str,
author: &git2::Signature<'_>,
) -> Result<LedgerEntry, Error>;
The committer would remain self.signature() (the local identity); only the author would be overridden.
Motivation
When importing GitHub issues, authorship should be attributed to the original author:
- name:
user.login
- email:
<login>@users.noreply.github.com
- time:
created_at from the GitHub payload
Without this, all imported commits appear authored by whoever ran the import.
Assisted-by: Claude Code (Claude Sonnet 4.6)
The
Ledger::createmethod currently usesself.signature()(the repo's git config) for both author and committer with no way to override them. For import use cases — e.g. syncing issues from GitHub into a local forge store — it's necessary to preserve original authorship and timestamp on the resulting commit.Proposed API
The
committerwould remainself.signature()(the local identity); only theauthorwould be overridden.Motivation
When importing GitHub issues, authorship should be attributed to the original author:
user.login<login>@users.noreply.github.comcreated_atfrom the GitHub payloadWithout this, all imported commits appear authored by whoever ran the import.
Assisted-by: Claude Code (Claude Sonnet 4.6)