mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-23 10:22:13 +08:00
enhance: restore original commit message if target commit changed from pending target to normal reword/edit
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -386,6 +386,7 @@ namespace SourceGit.ViewModels
|
||||
if (item.Action == Models.InteractiveRebaseAction.Reword ||
|
||||
item.Action == Models.InteractiveRebaseAction.Edit)
|
||||
{
|
||||
var oldPendingType = item.PendingType;
|
||||
item.IsFullMessageUsed = true;
|
||||
item.ShowEditMessageButton = true;
|
||||
item.PendingType = hasPending ? Models.InteractiveRebasePendingType.Target : Models.InteractiveRebasePendingType.None;
|
||||
@@ -405,6 +406,11 @@ namespace SourceGit.ViewModels
|
||||
hasPending = false;
|
||||
pendingMessages.Clear();
|
||||
}
|
||||
else if (oldPendingType == Models.InteractiveRebasePendingType.Target)
|
||||
{
|
||||
if (!item.IsMessageUserEdited)
|
||||
item.FullMessage = item.OriginalFullMessage;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace SourceGit.Views
|
||||
return;
|
||||
|
||||
var startW = 4;
|
||||
var endW = Bounds.Width - 4;
|
||||
var endW = Bounds.Width - 6;
|
||||
var height = Bounds.Height;
|
||||
var halfH = height * 0.5;
|
||||
var fill = Fill;
|
||||
|
||||
Reference in New Issue
Block a user