Open app editor for interactive rebase todo

This commit is contained in:
Joe Tretter
2026-05-18 19:01:12 -05:00
parent d4e2c8714c
commit ce58f46b48
6 changed files with 148 additions and 5 deletions

View File

@@ -23,6 +23,19 @@ class GitEditorCommandsTest {
assertNull(parseGitEditorInvocation("git commit --amend --no-edit"))
}
@Test
fun interactiveRebaseOpensTodoEditor() {
val invocation = parseGitEditorInvocation("git rebase -i HEAD~3")
assertEquals(GitEditorCommandKind.REBASE_TODO, invocation?.kind)
assertEquals("Edit Rebase Todo", invocation?.title)
}
@Test
fun bareInteractiveRebaseDoesNotOpenTodoEditor() {
assertNull(parseGitEditorInvocation("git rebase -i"))
}
@Test
fun annotatedTagWithoutMessageOpensEditor() {
val invocation = parseGitEditorInvocation("git tag -a v1.0")