feature: allow to reset author when --amend is enabled for committing

This commit is contained in:
leo 2025-05-26 12:28:00 +08:00
parent d3bc85418e
commit 0641a22230
No known key found for this signature in database
8 changed files with 38 additions and 12 deletions

View file

@ -37,9 +37,11 @@ namespace SourceGit.ViewModels
var log = _repo.CreateLog("Reword HEAD");
Use(log);
var signOff = _repo.Settings.EnableSignOffForCommit;
return Task.Run(() =>
{
var succ = new Commands.Commit(_repo.FullPath, _message, true, _repo.Settings.EnableSignOffForCommit).Use(log).Run();
// For reword (only changes the commit message), disable `--reset-author`
var succ = new Commands.Commit(_repo.FullPath, _message, signOff, true, false).Use(log).Run();
log.Complete();
CallUIThread(() => _repo.SetWatcherEnabled(true));
return succ;