Skip to content

Commit 1c7d855

Browse files
committed
fix: use CoreEditor instead of RebaseEditor when rebase --continue (fix #2352)
- Use `CoreEditor` in rebase continue to prevent re-triggering the sequence editor on each `--continue` action - Avoids git mis-counting done/todo entries and writing duplicate commit entries to the done file mid-rebase (cherry picked from commit c14b2cedf850ab64d38cea44decf7abe871893fb)
1 parent 89c9bc9 commit 1c7d855

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/ViewModels/InProgressContexts.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,11 @@ public RebaseInProgress(Repository repo)
114114
{
115115
WorkingDirectory = repo.FullPath,
116116
Context = repo.FullPath,
117-
Editor = Commands.Command.EditorType.RebaseEditor,
117+
// Use CoreEditor instead of RebaseEditor to avoid re-triggering
118+
// the sequence.editor on each --continue. Re-triggering the todo
119+
// editor mid-rebase can cause git to mis-count done/todo entries
120+
// and write duplicate commit entries to the done file.
121+
Editor = Commands.Command.EditorType.CoreEditor,
118122
Args = "rebase --continue",
119123
};
120124

0 commit comments

Comments
 (0)