From de10b170c95d5e24b839848c4d7eeb5c4457fe40 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 7 Nov 2026 11:13:24 +0100 Subject: [PATCH] Add a test for a stopped rebase being shown as a cherry-pick If git can't take the index lock to commit the changes of a pick during a rebase, it exits without recording that the rebase stopped. It leaves CHERRY_PICK_HEAD behind, but no rebase-merge/stopped-sha. Lazygit only recognizes CHERRY_PICK_HEAD as part of a rebase if stopped-sha matches it, so it shows the rebase as a cherry-pick. Its "Cherry-pick options" then run cherry-pick commands during the rebase. Continuing happens to work, but takes two steps. Skipping or aborting discards the changes of the pick, and continuing the rebase afterwards loses that commit. Co-Authored-By: Claude Opus 5.5 --- .../lock_error_partway_through_skip.go | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pkg/integration/tests/interactive_rebase/lock_error_partway_through_skip.go b/pkg/integration/tests/interactive_rebase/lock_error_partway_through_skip.go index 992225336..c1d0bfdd3 100644 --- a/pkg/integration/tests/interactive_rebase/lock_error_partway_through_skip.go +++ b/pkg/integration/tests/interactive_rebase/lock_error_partway_through_skip.go @@ -64,5 +64,29 @@ var LockErrorPartwayThroughSkip = NewIntegrationTest(NewIntegrationTestArgs{ Lines( Contains("A").Contains("file-y"), ) + + t.Views().Status().Content(Contains("(cherry-picking)")) + + t.GlobalPress(keys.Universal.CreateRebaseOptionsMenu) + t.ExpectPopup().Menu(). + Title(Equals("Cherry-pick options")). + Select(Contains("continue")). + Confirm() + + t.Views().Status().Content(Contains("(rebasing)")) + + t.GlobalPress(keys.Universal.CreateRebaseOptionsMenu) + t.ExpectPopup().Menu(). + Title(Equals("Rebase options")). + Select(Contains("continue")). + Confirm() + + t.Views().Commits(). + Lines( + Contains("add file-z"), + Contains("add file-y"), + Contains("edited commit"), + Contains("base"), + ) }, })