pijul git: link commits to identities via email

kenranunderscore
Oct 7, 2025, 7:33 PM
H7WRJQNUNHHRDIN7AF6F4AXM2T3UXGG5HWNQE7PTPUQOE5MGGWMQC

Dependencies

  • [2] G2WWGRN2 Refactor git command's handling of repo and channel
  • [3] MKDWLE4V 🩹 Reorder imports, solve merge conflicts, post merge cleanup
  • [4] RUBBHYZ7 Removing unnecessary async/await
  • [5] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [6] JL4WKA5P Implement the Sanakirja concurrency model in a cross-process way
  • [7] BJOZ25EU Deterministic Git import
  • [8] IIV3EL2X Cleanup, formatting, and fixing the Git feature
  • [9] 6RVT5X4L Current state: return zero instead of an Option if there is no change on the channel
  • [10] 5SLOJYHG Fixing the Git feature
  • [11] WTRH4B2X Formatting
  • [12] EUZFFJSO Updating Pijul with the latest changes in Libpijul
  • [13] VGBH3ED6 The Git feature does not need to be async
  • [14] UC5C5REV `pijul git`: two more fields in the benchmarks
  • [15] FF4TXHN5 In `pijul git`, avoid diffing files not modified by a commit
  • [16] QF4CMUUN 🐛 Fix compilation after jiff migration
  • [17] DDEUZMXQ Refactor record command's handling of repo and channel
  • [18] YVA72CP2 Default feedback for the `pijul git` command
  • [19] GUL4M5FI Cleanup and formatting
  • [20] FAOGX7G3 Outputting the repo after the last Git import
  • [21] N26HD5PF Replace `chrono` with `jiff`
  • [22] KUUVOJUP Fixing the Git feature with the new save_change
  • [23] RP7YRM5Q Import Git repos without writing anything to disk
  • [24] B3QWIGDE Fixing the Git features with the latest Pijul (+ conflicts in Cargo.toml)
  • [25] NEJOYVJB Fixing the Git feature
  • [*] I52XSRUH Massive cleanup, and simplification
  • [*] HWH4WWN3 Proper separation of Git commit messages into a message and description fields in changes

Change contents

  • replacement in pijul/src/main.rs at line 231
    [4.88983][4.389:432]()
    SubCommand::Git(git) => git.run(),
    [4.88983]
    [4.432]
    SubCommand::Git(git) => git.run().await,
  • replacement in pijul/src/commands/record.rs at line 104
    [4.1209][3.394:428]()
    h?.1.0.into()
    [4.1209]
    [4.1244]
    h?.1 .0.into()
  • replacement in pijul/src/commands/git.rs at line 45
    [4.138045][4.0:52]()
    pub fn run(self) -> Result<(), anyhow::Error> {
    [4.138045]
    [2.42]
    pub async fn run(self) -> Result<(), anyhow::Error> {
  • replacement in pijul/src/commands/git.rs at line 95
    [4.139131][4.108:162]()
    import(&git, &mut env_git, &mut repo, &dag)?;
    [4.139131]
    [4.0]
    import(&git, &mut env_git, &mut repo, &dag).await?;
  • replacement in pijul/src/commands/git.rs at line 269
    [4.143830][4.163:174]()
    fn import(
    [4.143830]
    [4.143841]
    async fn import(
  • edit in pijul/src/commands/git.rs at line 314
    [4.145229]
    [4.145229]
    let all_identities = pijul_identity::Complete::load_all().unwrap();
  • replacement in pijul/src/commands/git.rs at line 348
    [4.13665][4.13665:13754]()
    let state = import_commit(git, repo, &txn, &channel, &oid, &mut stats)?;
    [4.13665]
    [4.146874]
    let state =
    import_commit(git, repo, &txn, &channel, &oid, &mut stats, &all_identities)
    .await?;
  • replacement in pijul/src/commands/git.rs at line 683
    [4.157569][4.3222:3301]()
    fn import_commit<T: TxnTExt + MutTxnTExt + GraphIter + Send + Sync + 'static>(
    [4.157569]
    [4.157612]
    async fn import_commit<T: TxnTExt + MutTxnTExt + GraphIter + Send + Sync + 'static>(
  • edit in pijul/src/commands/git.rs at line 690
    [4.157761]
    [27.3911]
    all_identities: &[pijul_identity::Complete],
  • edit in pijul/src/commands/git.rs at line 750
    [28.376]
    [4.87]
  • edit in pijul/src/commands/git.rs at line 752
    [4.125]
    [4.125]
    let email = signature.email().unwrap().to_string();
    let identity = if email.is_empty() {
    None
    } else {
    all_identities
    .iter()
    .find(|i| i.config.author.email == email)
    };
    if let Some(identity) = identity {
    author.insert("key".to_string(), identity.public_key.key.clone());
    };
    author.insert("email".to_string(), email);
  • edit in pijul/src/commands/git.rs at line 776
    [4.3147]
    [4.158632]
    identity,
  • replacement in pijul/src/commands/git.rs at line 788
    [4.15][4.159184:159191](),[4.159184][4.159184:159191]()
    );
    [4.15]
    [4.348]
    )
    .await;
  • replacement in pijul/src/commands/git.rs at line 819
    [4.160373][4.1477:1494]()
    fn record_apply<
    [4.160373]
    [4.3148]
    async fn record_apply<
  • edit in pijul/src/commands/git.rs at line 829
    [4.3355]
    [4.160635]
    identity: Option<&pijul_identity::Complete>,
  • replacement in pijul/src/commands/git.rs at line 899
    [4.23][4.23:92]()
    .save_change(&mut change, |_, _| Ok::<_, anyhow::Error>(()))
    [4.23]
    [4.92]
    .save_change(&mut change, |change, hash| {
    if let Some(identity) = identity {
    let secret = identity.decrypt().unwrap().0;
    change.unhashed = Some(serde_json::json!({
    "signature": secret.sign_raw(&hash.to_bytes()).unwrap(),
    }));
    }
    Ok::<_, anyhow::Error>(())
    })
  • edit in pijul/src/commands/git.rs at line 1030
    [4.203][4.203:283]()
    author.insert("email".to_string(), signature.email().unwrap().to_string());
  • resolve order conflict in pijul/src/commands/git.rs at line 1030
    [4.165170]