Fix tauri-plugin-git build after the gix 0.77 bump

Closed
DE
2mo ago
+5-2

Summary

Problem: Dependabot #7528 bumped gix 0.72 → 0.77 without touching plugins/git. In gix 0.77 CommitRef::author is the raw signature bytes (&BStr), so commit_ref.author.name / .time no longer compile and cargo check -p desktop fails on every platform. PRs don't run the native desktop lanes, so main has been red for the desktop Rust build since that merge (only visible on the scheduled desktop_ci run).

Fix: Use commit_ref.author() (returns a parsed SignatureRef, error mapped like the surrounding decode()), keeping the same author-name and first-token timestamp output. Also switch two deprecated peel_to_id_in_place() calls to peel_to_id() so the crate passes clippy -D warnings.

Verification

  • cargo check --locked -p tauri-plugin-git
  • cargo test --locked -p tauri-plugin-git
  • cargo clippy --locked -p tauri-plugin-git --all-targets --no-deps -- -D warnings
  • rustfmt --edition 2024 on the two changed files

Link to Devin session: https://app.devin.ai/sessions/f83ed73d85c648fcbdbd041cd4f15720
Open in Devin Desktop: https://app.devin.ai/desktop/session/f83ed73d85c648fcbdbd041cd4f15720?variant=devin
Requested by: @ComputelessComputer