Amending a signed commit overwrites author

Describe the bug

Amending a signed commit overwrites the author (bad) and the committer (good).

Amending an unsigned commit does not overwrite the author (good), but it also does not overwrite the committer (bad).

To Reproduce

  1. Check out a branch where the latest commit was authored and committed by someone else
  2. Run git log --pretty=full -n 1 and verify that the Author field shows someone other than you
  3. Stage changes
  4. Open the commit dialog
  5. Press Ctrl-A to make the pending commit be an amend operation
  6. Press Ctrl-D to finish the commit
  7. Run git log --pretty=full -n 1 again
  8. Observe that either the author or committer is wrong (depending on whether the commit you amended was signed)

Expected behavior

Amending a commit should overwrite the committer, but not the author.

Context

  • OS: Chimera Linux (updated as of 2025-11-20)
  • GitUI Version: 0.27.0
  • Rust version: 1.91.0