1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-28 16:02:01 +03:00

Implement "edit commit" in terms of the new EditRebase function

This commit is contained in:
Stefan Haller
2023-04-05 13:03:50 +02:00
parent 5645a662de
commit d50c58b4c6
3 changed files with 3 additions and 26 deletions

View File

@ -30,17 +30,8 @@ var DropTodoCommitWithUpdateRef = NewIntegrationTest(NewIntegrationTestArgs{
Contains("commit 02"),
Contains("commit 01"),
).
// Once "e" is fixed we can just hit "e", but for now we need to
// manually do a command-line rebase
// NavigateToLine(Contains("commit 01")).
// Press(keys.Universal.Edit).
Tap(func() {
t.GlobalPress(keys.Universal.ExecuteCustomCommand)
t.ExpectPopup().Prompt().
Title(Equals("Custom Command:")).
Type(`git -c core.editor="perl -i -lpe 'print \"break\" if $.==1'" rebase -i HEAD~5`).
Confirm()
}).
NavigateToLine(Contains("commit 01")).
Press(keys.Universal.Edit).
Focus().
Lines(
Contains("pick").Contains("(*) commit 06"),