Skip to content

Commit 343ea05

Browse files
committed
fix: for Fixup commits, message should not append to the target commit
Signed-off-by: leo <[email protected]>
1 parent a999d09 commit 343ea05

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/ViewModels/InteractiveRebase.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,19 @@ private void UpdateItems()
362362
continue;
363363
}
364364

365-
if (item.Action == Models.InteractiveRebaseAction.Fixup ||
366-
item.Action == Models.InteractiveRebaseAction.Squash)
365+
if (item.Action == Models.InteractiveRebaseAction.Fixup)
366+
{
367+
item.IsFullMessageUsed = false;
368+
item.ShowEditMessageButton = false;
369+
item.PendingType = hasPending ? Models.InteractiveRebasePendingType.Pending : Models.InteractiveRebasePendingType.Last;
370+
item.FullMessage = item.OriginalFullMessage;
371+
item.IsMessageUserEdited = false;
372+
373+
hasPending = true;
374+
continue;
375+
}
376+
377+
if (item.Action == Models.InteractiveRebaseAction.Squash)
367378
{
368379
item.IsFullMessageUsed = false;
369380
item.ShowEditMessageButton = false;

0 commit comments

Comments
 (0)