From 9c564ae2548405ac87e2ed82cd3fe0d13ada440b Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sun, 6 Apr 2025 11:35:45 +0200 Subject: [PATCH 1/4] Fix view selection running out of sync with list selection when view isn't focused When rerendering a view at the end of a refresh, we call HandleFocus only if the view has the focus. This is so that we rerender the main view for the new selection. What was missing here is to update the view selection from the list selection if the view doesn't have the focus, so that the selection is painted properly. Normally this is not relevant because you don't see the selection if another side panel has the focus; however, you do see it as an inactive selection when e.g. a popup is shown, in which case it does matter. This will become more important when we introduce section headers for commits, because in that case the view selection needs to change when the working copy state changes from normal to rebasing or vice versa, even if the list selection stays the same. The changed test submodule/reset.go shows how this was wrong before: when entering the submodule again after resetting, there is a refresh which keeps the same branch selected as before (master); however, since the branches panel is not focused, the view didn't notice and kept thinking that the detached head is selected (which it isn't, you can tell by running the test in sandbox mode and focusing the branches panel at the end: you'll see that master is selected). So the change in this commit fixes that. --- pkg/gui/context/list_context_trait.go | 2 ++ pkg/gui/context/simple_context.go | 3 +++ pkg/gui/types/context.go | 2 +- pkg/gui/view_helpers.go | 7 +++++++ pkg/integration/tests/submodule/reset.go | 4 ++-- 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/pkg/gui/context/list_context_trait.go b/pkg/gui/context/list_context_trait.go index 1c059fb4ff8..25616af0a0a 100644 --- a/pkg/gui/context/list_context_trait.go +++ b/pkg/gui/context/list_context_trait.go @@ -26,6 +26,8 @@ type ListContextTrait struct { func (self *ListContextTrait) IsListContext() {} func (self *ListContextTrait) FocusLine() { + self.Context.FocusLine() + // Doing this at the end of the layout function because we need the view to be // resized before we focus the line, otherwise if we're in accordion mode // the view could be squashed and won't how to adjust the cursor/origin. diff --git a/pkg/gui/context/simple_context.go b/pkg/gui/context/simple_context.go index 579f975e625..db8160ea0c9 100644 --- a/pkg/gui/context/simple_context.go +++ b/pkg/gui/context/simple_context.go @@ -54,6 +54,9 @@ func (self *SimpleContext) HandleFocusLost(opts types.OnFocusLostOpts) { } } +func (self *SimpleContext) FocusLine() { +} + func (self *SimpleContext) HandleRender() { if self.handleRenderFunc != nil { self.handleRenderFunc() diff --git a/pkg/gui/types/context.go b/pkg/gui/types/context.go index eea207360ae..8a9bbf25b4a 100644 --- a/pkg/gui/types/context.go +++ b/pkg/gui/types/context.go @@ -105,6 +105,7 @@ type Context interface { HandleFocus(opts OnFocusOpts) HandleFocusLost(opts OnFocusLostOpts) + FocusLine() HandleRender() HandleRenderToMain() } @@ -173,7 +174,6 @@ type IListContext interface { ViewIndexToModelIndex(int) int ModelIndexToViewIndex(int) int - FocusLine() IsListContext() // used for type switch RangeSelectEnabled() bool RenderOnlyVisibleLines() bool diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go index 624d6e25f3c..bf83fd7f355 100644 --- a/pkg/gui/view_helpers.go +++ b/pkg/gui/view_helpers.go @@ -136,5 +136,12 @@ func (gui *Gui) postRefreshUpdate(c types.Context) { if gui.currentViewName() == c.GetViewName() { c.HandleFocus(types.OnFocusOpts{}) + } else { + // The FocusLine call is included in the HandleFocus method which we + // call for focused views above; but we need to call it here for + // non-focused views to ensure that an inactive selection is painted + // correctly, and that integration tests see the up to date selection + // state. + c.FocusLine() } } diff --git a/pkg/integration/tests/submodule/reset.go b/pkg/integration/tests/submodule/reset.go index 6f78d974f04..5cd6d58aa25 100644 --- a/pkg/integration/tests/submodule/reset.go +++ b/pkg/integration/tests/submodule/reset.go @@ -107,8 +107,8 @@ var Reset = NewIntegrationTest(NewIntegrationTestArgs{ // submodule has been hard reset to the commit the parent repo specifies t.Views().Branches().Lines( - Contains("HEAD detached").IsSelected(), - Contains("master"), + Contains("HEAD detached"), + Contains("master").IsSelected(), ) // empty commit is gone From e7bd0302226f466130c2c4a46f8e25d6a968a9c7 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 5 Apr 2025 11:05:46 +0200 Subject: [PATCH 2/4] Add new commit status StatusCherryPickingOrReverting This is needed because we want to show different section headers for rebase todos and cherry-pick/revert todos. --- pkg/commands/git_commands/commit_loader.go | 2 +- pkg/commands/models/commit.go | 1 + pkg/gui/presentation/commits.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/commands/git_commands/commit_loader.go b/pkg/commands/git_commands/commit_loader.go index 2f4556bb969..96b3d1b1331 100644 --- a/pkg/commands/git_commands/commit_loader.go +++ b/pkg/commands/git_commands/commit_loader.go @@ -496,7 +496,7 @@ func (self *CommitLoader) getSequencerCommits() []*models.Commit { commits = utils.Prepend(commits, &models.Commit{ Hash: t.Commit, Name: t.Msg, - Status: models.StatusRebasing, + Status: models.StatusCherryPickingOrReverting, Action: t.Command, }) } diff --git a/pkg/commands/models/commit.go b/pkg/commands/models/commit.go index b6594705558..085404d8f75 100644 --- a/pkg/commands/models/commit.go +++ b/pkg/commands/models/commit.go @@ -18,6 +18,7 @@ const ( StatusPushed StatusMerged StatusRebasing + StatusCherryPickingOrReverting StatusConflicted StatusReflog ) diff --git a/pkg/gui/presentation/commits.go b/pkg/gui/presentation/commits.go index b2cff6e430b..8296198fc9a 100644 --- a/pkg/gui/presentation/commits.go +++ b/pkg/gui/presentation/commits.go @@ -505,7 +505,7 @@ func getHashColor( hashColor = style.FgYellow case models.StatusMerged: hashColor = style.FgGreen - case models.StatusRebasing, models.StatusConflicted: + case models.StatusRebasing, models.StatusCherryPickingOrReverting, models.StatusConflicted: hashColor = style.FgBlue case models.StatusReflog: hashColor = style.FgBlue From ef400f156cacb553b97deb53ed4d7506fb0a0cfa Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Fri, 4 Apr 2025 18:26:33 +0200 Subject: [PATCH 3/4] Add section headers for rebase todos, cherry-picks, reverts, and actual commits --- pkg/gui/context/local_commits_context.go | 47 +++++++++++++++++++ pkg/i18n/english.go | 8 ++++ .../tests/branch/rebase_and_drop.go | 4 ++ .../cherry_pick/cherry_pick_during_rebase.go | 4 ++ ...mend_when_there_are_conflicts_and_amend.go | 2 + ...end_when_there_are_conflicts_and_cancel.go | 2 + .../revert_with_conflict_multiple_commits.go | 2 + .../revert_with_conflict_single_commit.go | 2 + pkg/integration/tests/commit/shared.go | 2 + .../advanced_interactive_rebase.go | 6 +++ .../amend_commit_with_conflict.go | 4 ++ .../amend_head_commit_during_rebase.go | 4 ++ .../amend_non_head_commit_during_rebase.go | 2 + .../delete_update_ref_todo.go | 4 ++ .../dont_show_branch_heads_for_todo_items.go | 2 + .../drop_todo_commit_with_update_ref.go | 2 + .../interactive_rebase/edit_and_auto_amend.go | 2 + .../interactive_rebase/edit_first_commit.go | 2 + .../edit_last_commit_of_stacked_branch.go | 2 + .../edit_non_todo_commit_during_rebase.go | 2 + ...nge_select_down_to_merge_outside_rebase.go | 2 + .../edit_range_select_outside_rebase.go | 2 + .../edit_the_confl_commit.go | 2 + .../interactive_rebase_of_copied_branch.go | 2 + ...e_rebase_with_conflict_for_edit_command.go | 2 + .../mid_rebase_range_select.go | 26 ++++++++++ .../interactive_rebase/move_in_rebase.go | 16 +++++++ .../move_update_ref_todo.go | 4 ++ .../interactive_rebase/pick_rescheduled.go | 4 ++ .../tests/interactive_rebase/quick_start.go | 4 ++ .../quick_start_keep_selection.go | 2 + .../quick_start_keep_selection_range.go | 2 + .../tests/interactive_rebase/rebase.go | 12 +++++ ...vert_during_rebase_when_stopped_on_edit.go | 4 ++ ..._multiple_commits_in_interactive_rebase.go | 5 ++ ...ert_single_commit_in_interactive_rebase.go | 5 ++ .../reword_commit_with_editor_and_fail.go | 2 + .../reword_you_are_here_commit.go | 4 ++ .../reword_you_are_here_commit_with_editor.go | 4 ++ .../tests/interactive_rebase/shared.go | 2 + .../interactive_rebase/show_exec_todos.go | 4 ++ .../swap_in_rebase_with_conflict.go | 4 ++ .../swap_in_rebase_with_conflict_and_edit.go | 4 ++ .../view_files_of_todo_entries.go | 2 + .../sync/pull_rebase_interactive_conflict.go | 2 + .../pull_rebase_interactive_conflict_drop.go | 4 ++ 46 files changed, 231 insertions(+) diff --git a/pkg/gui/context/local_commits_context.go b/pkg/gui/context/local_commits_context.go index f40f7f0ff49..6e69046c1cd 100644 --- a/pkg/gui/context/local_commits_context.go +++ b/pkg/gui/context/local_commits_context.go @@ -1,6 +1,7 @@ package context import ( + "fmt" "log" "strings" "time" @@ -66,6 +67,51 @@ func NewLocalCommitsContext(c *ContextCommon) *LocalCommitsContext { ) } + getNonModelItems := func() []*NonModelItem { + result := []*NonModelItem{} + if c.Model().WorkingTreeStateAtLastCommitRefresh.CanShowTodos() { + if c.Model().WorkingTreeStateAtLastCommitRefresh.Rebasing { + result = append(result, &NonModelItem{ + Index: 0, + Content: fmt.Sprintf("--- %s ---", c.Tr.PendingRebaseTodosSectionHeader), + }) + } + + if c.Model().WorkingTreeStateAtLastCommitRefresh.CherryPicking || + c.Model().WorkingTreeStateAtLastCommitRefresh.Reverting { + _, firstCherryPickOrRevertTodo, found := lo.FindIndexOf( + c.Model().Commits, func(c *models.Commit) bool { + return c.Status == models.StatusCherryPickingOrReverting || + c.Status == models.StatusConflicted + }) + if !found { + firstCherryPickOrRevertTodo = 0 + } + label := lo.Ternary(c.Model().WorkingTreeStateAtLastCommitRefresh.CherryPicking, + c.Tr.PendingCherryPicksSectionHeader, + c.Tr.PendingRevertsSectionHeader) + result = append(result, &NonModelItem{ + Index: firstCherryPickOrRevertTodo, + Content: fmt.Sprintf("--- %s ---", label), + }) + } + + _, firstRealCommit, found := lo.FindIndexOf( + c.Model().Commits, func(c *models.Commit) bool { + return !c.IsTODO() + }) + if !found { + firstRealCommit = 0 + } + result = append(result, &NonModelItem{ + Index: firstRealCommit, + Content: fmt.Sprintf("--- %s ---", c.Tr.CommitsSectionHeader), + }) + } + + return result + } + ctx := &LocalCommitsContext{ LocalCommitsViewModel: viewModel, SearchTrait: NewSearchTrait(c), @@ -82,6 +128,7 @@ func NewLocalCommitsContext(c *ContextCommon) *LocalCommitsContext { ListRenderer: ListRenderer{ list: viewModel, getDisplayStrings: getDisplayStrings, + getNonModelItems: getNonModelItems, }, c: c, refreshViewportOnChange: true, diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index ced96cc8a01..e25bde0e4b6 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -350,6 +350,10 @@ type TranslationSet struct { NoRoom string YouAreHere string ConflictLabel string + PendingRebaseTodosSectionHeader string + PendingCherryPicksSectionHeader string + PendingRevertsSectionHeader string + CommitsSectionHeader string YouDied string RewordNotSupported string ChangingThisActionIsNotAllowed string @@ -1419,6 +1423,10 @@ func EnglishTranslationSet() *TranslationSet { NoRoom: "Not enough room", YouAreHere: "YOU ARE HERE", ConflictLabel: "CONFLICT", + PendingRebaseTodosSectionHeader: "Pending rebase todos", + PendingCherryPicksSectionHeader: "Pending cherry-picks", + PendingRevertsSectionHeader: "Pending reverts", + CommitsSectionHeader: "Commits", YouDied: "YOU DIED!", RewordNotSupported: "Rewording commits while interactively rebasing is not currently supported", ChangingThisActionIsNotAllowed: "Changing this kind of rebase todo entry is not allowed", diff --git a/pkg/integration/tests/branch/rebase_and_drop.go b/pkg/integration/tests/branch/rebase_and_drop.go index 88e2e39c632..896d27068a5 100644 --- a/pkg/integration/tests/branch/rebase_and_drop.go +++ b/pkg/integration/tests/branch/rebase_and_drop.go @@ -51,9 +51,11 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{ t.Views().Commits(). Focus(). TopLines( + Contains("--- Pending rebase todos ---"), MatchesRegexp(`pick.*to keep`).IsSelected(), MatchesRegexp(`pick.*to remove`), MatchesRegexp(`pick.*CONFLICT.*first change`), + Contains("--- Commits ---"), MatchesRegexp("second-change-branch unrelated change"), MatchesRegexp("second change"), MatchesRegexp("original"), @@ -61,9 +63,11 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{ SelectNextItem(). Press(keys.Universal.Remove). TopLines( + Contains("--- Pending rebase todos ---"), MatchesRegexp(`pick.*to keep`), MatchesRegexp(`drop.*to remove`).IsSelected(), MatchesRegexp(`pick.*CONFLICT.*first change`), + Contains("--- Commits ---"), MatchesRegexp("second-change-branch unrelated change"), MatchesRegexp("second change"), MatchesRegexp("original"), diff --git a/pkg/integration/tests/cherry_pick/cherry_pick_during_rebase.go b/pkg/integration/tests/cherry_pick/cherry_pick_during_rebase.go index 1833337548b..e6dfb3ef07c 100644 --- a/pkg/integration/tests/cherry_pick/cherry_pick_during_rebase.go +++ b/pkg/integration/tests/cherry_pick/cherry_pick_during_rebase.go @@ -59,7 +59,9 @@ var CherryPickDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{ SelectNextItem(). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick CI two"), + Contains("--- Commits ---"), Contains(" CI <-- YOU ARE HERE --- one").IsSelected(), Contains(" CI base"), ). @@ -74,7 +76,9 @@ var CherryPickDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{ t.Views().Information().Content(DoesNotContain("commit copied")) }). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick CI two"), + Contains("--- Commits ---"), Contains(" CI <-- YOU ARE HERE --- three"), Contains(" CI one"), Contains(" CI base"), diff --git a/pkg/integration/tests/commit/amend_when_there_are_conflicts_and_amend.go b/pkg/integration/tests/commit/amend_when_there_are_conflicts_and_amend.go index c031e0c3da5..acc2f389c14 100644 --- a/pkg/integration/tests/commit/amend_when_there_are_conflicts_and_amend.go +++ b/pkg/integration/tests/commit/amend_when_there_are_conflicts_and_amend.go @@ -29,8 +29,10 @@ var AmendWhenThereAreConflictsAndAmend = NewIntegrationTest(NewIntegrationTestAr t.Views().Commits(). Focus(). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("commit three"), Contains("pick").Contains("<-- CONFLICT --- file1 changed in branch"), + Contains("--- Commits ---"), Contains("commit two"), Contains("file1 changed in master"), Contains("base commit"), diff --git a/pkg/integration/tests/commit/amend_when_there_are_conflicts_and_cancel.go b/pkg/integration/tests/commit/amend_when_there_are_conflicts_and_cancel.go index 12640963110..f7f5ec2e1a7 100644 --- a/pkg/integration/tests/commit/amend_when_there_are_conflicts_and_cancel.go +++ b/pkg/integration/tests/commit/amend_when_there_are_conflicts_and_cancel.go @@ -33,8 +33,10 @@ var AmendWhenThereAreConflictsAndCancel = NewIntegrationTest(NewIntegrationTestA t.Views().Commits(). Focus(). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("commit three"), Contains("pick").Contains("<-- CONFLICT --- file1 changed in branch"), + Contains("--- Commits ---"), Contains("commit two"), Contains("file1 changed in master"), Contains("base commit"), diff --git a/pkg/integration/tests/commit/revert_with_conflict_multiple_commits.go b/pkg/integration/tests/commit/revert_with_conflict_multiple_commits.go index ad3761ba238..e702c79b3c4 100644 --- a/pkg/integration/tests/commit/revert_with_conflict_multiple_commits.go +++ b/pkg/integration/tests/commit/revert_with_conflict_multiple_commits.go @@ -44,8 +44,10 @@ var RevertWithConflictMultipleCommits = NewIntegrationTest(NewIntegrationTestArg Confirm() }). Lines( + Contains("--- Pending reverts ---"), Contains("revert").Contains("CI unrelated change"), Contains("revert").Contains("CI <-- CONFLICT --- add first line"), + Contains("--- Commits ---"), Contains("CI ◯ add second line"), Contains("CI ◯ add first line"), Contains("CI ◯ unrelated change"), diff --git a/pkg/integration/tests/commit/revert_with_conflict_single_commit.go b/pkg/integration/tests/commit/revert_with_conflict_single_commit.go index 48095246420..4d98fdfe5ca 100644 --- a/pkg/integration/tests/commit/revert_with_conflict_single_commit.go +++ b/pkg/integration/tests/commit/revert_with_conflict_single_commit.go @@ -39,7 +39,9 @@ var RevertWithConflictSingleCommit = NewIntegrationTest(NewIntegrationTestArgs{ Confirm() }). Lines( + Contains("--- Pending reverts ---"), Contains("revert").Contains("CI <-- CONFLICT --- add first line"), + Contains("--- Commits ---"), Contains("CI ◯ add second line"), Contains("CI ◯ add first line"), Contains("CI ◯ add empty file"), diff --git a/pkg/integration/tests/commit/shared.go b/pkg/integration/tests/commit/shared.go index 17b06108d9e..918197aaf3c 100644 --- a/pkg/integration/tests/commit/shared.go +++ b/pkg/integration/tests/commit/shared.go @@ -43,8 +43,10 @@ func doTheRebaseForAmendTests(t *TestDriver, keys config.KeybindingConfig) { t.Views().Commits(). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("commit three"), Contains("pick").Contains("<-- CONFLICT --- file1 changed in branch"), + Contains("--- Commits ---"), Contains("commit two"), Contains("file1 changed in master"), Contains("base commit"), diff --git a/pkg/integration/tests/interactive_rebase/advanced_interactive_rebase.go b/pkg/integration/tests/interactive_rebase/advanced_interactive_rebase.go index 771b2e164ee..bcf84e59c4e 100644 --- a/pkg/integration/tests/interactive_rebase/advanced_interactive_rebase.go +++ b/pkg/integration/tests/interactive_rebase/advanced_interactive_rebase.go @@ -45,19 +45,25 @@ var AdvancedInteractiveRebase = NewIntegrationTest(NewIntegrationTestArgs{ t.Views().Commits(). IsFocused(). Lines( + Contains("--- Pending rebase todos ---"), Contains(TOP_COMMIT), + Contains("--- Commits ---"), Contains(BASE_COMMIT).Contains("YOU ARE HERE"), ). NavigateToLine(Contains(TOP_COMMIT)). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains(TOP_COMMIT).Contains("edit"), + Contains("--- Commits ---"), Contains(BASE_COMMIT).Contains("YOU ARE HERE"), ). Tap(func() { t.Common().ContinueRebase() }). Lines( + Contains("--- Pending rebase todos ---"), + Contains("--- Commits ---"), Contains(TOP_COMMIT).Contains("YOU ARE HERE"), Contains(BASE_COMMIT), ) diff --git a/pkg/integration/tests/interactive_rebase/amend_commit_with_conflict.go b/pkg/integration/tests/interactive_rebase/amend_commit_with_conflict.go index 7cf49ba63eb..ef01739dc8f 100644 --- a/pkg/integration/tests/interactive_rebase/amend_commit_with_conflict.go +++ b/pkg/integration/tests/interactive_rebase/amend_commit_with_conflict.go @@ -34,8 +34,10 @@ var AmendCommitWithConflict = NewIntegrationTest(NewIntegrationTestArgs{ t.Common().AcknowledgeConflicts() }). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("three"), Contains("fixup").Contains("<-- CONFLICT --- fixup! two"), + Contains("--- Commits ---"), Contains("two"), Contains("one"), ) @@ -66,7 +68,9 @@ var AmendCommitWithConflict = NewIntegrationTest(NewIntegrationTestArgs{ t.Views().Commits(). Lines( + Contains("--- Pending rebase todos ---"), Contains("<-- CONFLICT --- three"), + Contains("--- Commits ---"), Contains("two"), Contains("one"), ) diff --git a/pkg/integration/tests/interactive_rebase/amend_head_commit_during_rebase.go b/pkg/integration/tests/interactive_rebase/amend_head_commit_during_rebase.go index 10e7f06394f..5d24d2a0828 100644 --- a/pkg/integration/tests/interactive_rebase/amend_head_commit_during_rebase.go +++ b/pkg/integration/tests/interactive_rebase/amend_head_commit_during_rebase.go @@ -24,7 +24,9 @@ var AmendHeadCommitDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("commit 02")). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit 03"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 02").IsSelected(), Contains("commit 01"), ) @@ -48,7 +50,9 @@ var AmendHeadCommitDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{ Confirm() }). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit 03"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 02").IsSelected(), Contains("commit 01"), ) diff --git a/pkg/integration/tests/interactive_rebase/amend_non_head_commit_during_rebase.go b/pkg/integration/tests/interactive_rebase/amend_non_head_commit_during_rebase.go index a0d0f066e50..fca17bfb4ca 100644 --- a/pkg/integration/tests/interactive_rebase/amend_non_head_commit_during_rebase.go +++ b/pkg/integration/tests/interactive_rebase/amend_non_head_commit_during_rebase.go @@ -24,7 +24,9 @@ var AmendNonHeadCommitDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("commit 02")). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit 03"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 02"), Contains("commit 01"), ) diff --git a/pkg/integration/tests/interactive_rebase/delete_update_ref_todo.go b/pkg/integration/tests/interactive_rebase/delete_update_ref_todo.go index 9bb216cfe2a..28000bdb00c 100644 --- a/pkg/integration/tests/interactive_rebase/delete_update_ref_todo.go +++ b/pkg/integration/tests/interactive_rebase/delete_update_ref_todo.go @@ -26,12 +26,14 @@ var DeleteUpdateRefTodo = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("commit 01")). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("CI commit 06"), Contains("pick").Contains("CI commit 05"), Contains("pick").Contains("CI commit 04"), Contains("update-ref").Contains("branch1"), Contains("pick").Contains("CI commit 03"), Contains("pick").Contains("CI commit 02"), + Contains("--- Commits ---"), Contains("CI ◯ <-- YOU ARE HERE --- commit 01"), ). NavigateToLine(Contains("update-ref")). @@ -43,11 +45,13 @@ var DeleteUpdateRefTodo = NewIntegrationTest(NewIntegrationTestArgs{ Confirm() }). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("CI commit 06"), Contains("pick").Contains("CI commit 05"), Contains("pick").Contains("CI commit 04"), Contains("pick").Contains("CI commit 03").IsSelected(), Contains("pick").Contains("CI commit 02"), + Contains("--- Commits ---"), Contains("CI ◯ <-- YOU ARE HERE --- commit 01"), ). NavigateToLine(Contains("commit 02")). diff --git a/pkg/integration/tests/interactive_rebase/dont_show_branch_heads_for_todo_items.go b/pkg/integration/tests/interactive_rebase/dont_show_branch_heads_for_todo_items.go index 7c2599f0b8b..8f26e680387 100644 --- a/pkg/integration/tests/interactive_rebase/dont_show_branch_heads_for_todo_items.go +++ b/pkg/integration/tests/interactive_rebase/dont_show_branch_heads_for_todo_items.go @@ -41,12 +41,14 @@ var DontShowBranchHeadsForTodoItems = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("commit 04")). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("CI commit 09"), Contains("pick").Contains("CI commit 08"), Contains("pick").Contains("CI commit 07"), Contains("update-ref").Contains("branch2"), Contains("pick").Contains("CI commit 06"), // no star on this entry, even though branch2 points to it Contains("pick").Contains("CI commit 05"), + Contains("--- Commits ---"), Contains("CI <-- YOU ARE HERE --- commit 04"), Contains("CI commit 03"), Contains("CI * commit 02"), // this star is fine though diff --git a/pkg/integration/tests/interactive_rebase/drop_todo_commit_with_update_ref.go b/pkg/integration/tests/interactive_rebase/drop_todo_commit_with_update_ref.go index 8510055af92..8e596733d02 100644 --- a/pkg/integration/tests/interactive_rebase/drop_todo_commit_with_update_ref.go +++ b/pkg/integration/tests/interactive_rebase/drop_todo_commit_with_update_ref.go @@ -39,12 +39,14 @@ var DropTodoCommitWithUpdateRef = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("commit 02")). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("CI commit 07"), Contains("pick").Contains("CI commit 06"), Contains("pick").Contains("CI commit 05"), Contains("update-ref").Contains("branch1").DoesNotContain("*"), Contains("pick").Contains("CI commit 04"), Contains("pick").Contains("CI commit 03"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 02").IsSelected(), Contains("CI commit 01"), ). diff --git a/pkg/integration/tests/interactive_rebase/edit_and_auto_amend.go b/pkg/integration/tests/interactive_rebase/edit_and_auto_amend.go index 8c569ede622..e07146a06a9 100644 --- a/pkg/integration/tests/interactive_rebase/edit_and_auto_amend.go +++ b/pkg/integration/tests/interactive_rebase/edit_and_auto_amend.go @@ -25,7 +25,9 @@ var EditAndAutoAmend = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("commit 02")). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit 03"), + Contains("--- Commits ---"), MatchesRegexp("YOU ARE HERE.*commit 02").IsSelected(), Contains("commit 01"), ) diff --git a/pkg/integration/tests/interactive_rebase/edit_first_commit.go b/pkg/integration/tests/interactive_rebase/edit_first_commit.go index f6ea49ed1aa..c30a1cfb126 100644 --- a/pkg/integration/tests/interactive_rebase/edit_first_commit.go +++ b/pkg/integration/tests/interactive_rebase/edit_first_commit.go @@ -24,7 +24,9 @@ var EditFirstCommit = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("commit 01")). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit 02"), + Contains("--- Commits ---"), MatchesRegexp("YOU ARE HERE.*commit 01").IsSelected(), ). Tap(func() { diff --git a/pkg/integration/tests/interactive_rebase/edit_last_commit_of_stacked_branch.go b/pkg/integration/tests/interactive_rebase/edit_last_commit_of_stacked_branch.go index 35d89e8e989..a4d7558fe1d 100644 --- a/pkg/integration/tests/interactive_rebase/edit_last_commit_of_stacked_branch.go +++ b/pkg/integration/tests/interactive_rebase/edit_last_commit_of_stacked_branch.go @@ -37,9 +37,11 @@ var EditLastCommitOfStackedBranch = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("commit 03")). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("CI commit 05"), Contains("pick").Contains("CI commit 04"), Contains("update-ref").Contains("branch1"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- * commit 03").IsSelected(), Contains("CI commit 02"), Contains("CI commit 01"), diff --git a/pkg/integration/tests/interactive_rebase/edit_non_todo_commit_during_rebase.go b/pkg/integration/tests/interactive_rebase/edit_non_todo_commit_during_rebase.go index 88417ccddda..f1665157a60 100644 --- a/pkg/integration/tests/interactive_rebase/edit_non_todo_commit_during_rebase.go +++ b/pkg/integration/tests/interactive_rebase/edit_non_todo_commit_during_rebase.go @@ -23,6 +23,8 @@ var EditNonTodoCommitDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{ ). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 02"), Contains("commit 01"), ). diff --git a/pkg/integration/tests/interactive_rebase/edit_range_select_down_to_merge_outside_rebase.go b/pkg/integration/tests/interactive_rebase/edit_range_select_down_to_merge_outside_rebase.go index 8ef1446fbad..9182c21c8c8 100644 --- a/pkg/integration/tests/interactive_rebase/edit_range_select_down_to_merge_outside_rebase.go +++ b/pkg/integration/tests/interactive_rebase/edit_range_select_down_to_merge_outside_rebase.go @@ -27,8 +27,10 @@ var EditRangeSelectDownToMergeOutsideRebase = NewIntegrationTest(NewIntegrationT Press(keys.Universal.RangeSelectDown). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("edit CI commit 02").IsSelected(), Contains("edit CI commit 01").IsSelected(), + Contains("--- Commits ---").IsSelected(), Contains(" CI ⏣─╮ <-- YOU ARE HERE --- Merge branch 'second-change-branch' into first-change-branch").IsSelected(), Contains(" CI │ ◯ * second-change-branch unrelated change"), Contains(" CI │ ◯ second change"), diff --git a/pkg/integration/tests/interactive_rebase/edit_range_select_outside_rebase.go b/pkg/integration/tests/interactive_rebase/edit_range_select_outside_rebase.go index d12a9c77d35..46402418491 100644 --- a/pkg/integration/tests/interactive_rebase/edit_range_select_outside_rebase.go +++ b/pkg/integration/tests/interactive_rebase/edit_range_select_outside_rebase.go @@ -37,11 +37,13 @@ var EditRangeSelectOutsideRebase = NewIntegrationTest(NewIntegrationTestArgs{ ). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("merge CI Merge branch 'second-change-branch' into first-change-branch").IsSelected(), Contains("edit CI first change").IsSelected(), Contains("edit CI * second-change-branch unrelated change").IsSelected(), Contains("edit CI second change").IsSelected(), Contains("edit CI * original").IsSelected(), + Contains("--- Commits ---").IsSelected(), Contains(" CI ◯ <-- YOU ARE HERE --- three").IsSelected(), Contains(" CI ◯ two"), Contains(" CI ◯ one"), diff --git a/pkg/integration/tests/interactive_rebase/edit_the_confl_commit.go b/pkg/integration/tests/interactive_rebase/edit_the_confl_commit.go index 17d3ffe0e0a..5e03acdd5e8 100644 --- a/pkg/integration/tests/interactive_rebase/edit_the_confl_commit.go +++ b/pkg/integration/tests/interactive_rebase/edit_the_confl_commit.go @@ -32,8 +32,10 @@ var EditTheConflCommit = NewIntegrationTest(NewIntegrationTestArgs{ }). Focus(). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("commit two"), Contains("pick").Contains("<-- CONFLICT --- commit three"), + Contains("--- Commits ---"), Contains("commit one"), ). NavigateToLine(Contains("<-- CONFLICT --- commit three")). diff --git a/pkg/integration/tests/interactive_rebase/interactive_rebase_of_copied_branch.go b/pkg/integration/tests/interactive_rebase/interactive_rebase_of_copied_branch.go index 402d54b52e7..78e4e9cd982 100644 --- a/pkg/integration/tests/interactive_rebase/interactive_rebase_of_copied_branch.go +++ b/pkg/integration/tests/interactive_rebase/interactive_rebase_of_copied_branch.go @@ -32,9 +32,11 @@ var InteractiveRebaseOfCopiedBranch = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("commit 01")). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), // No update-ref todo for branch1 here, even though command-line git would have added it Contains("pick").Contains("CI commit 03"), Contains("pick").Contains("CI commit 02"), + Contains("--- Commits ---"), Contains("CI <-- YOU ARE HERE --- commit 01"), ) }, diff --git a/pkg/integration/tests/interactive_rebase/interactive_rebase_with_conflict_for_edit_command.go b/pkg/integration/tests/interactive_rebase/interactive_rebase_with_conflict_for_edit_command.go index fd09dfe3c83..11596e75896 100644 --- a/pkg/integration/tests/interactive_rebase/interactive_rebase_with_conflict_for_edit_command.go +++ b/pkg/integration/tests/interactive_rebase/interactive_rebase_with_conflict_for_edit_command.go @@ -52,7 +52,9 @@ var InteractiveRebaseWithConflictForEditCommand = NewIntegrationTest(NewIntegrat t.Views().Commits(). Lines( + Contains("--- Pending rebase todos ---"), Contains("edit").Contains("<-- CONFLICT --- this will conflict").IsSelected(), + Contains("--- Commits ---"), Contains("commit 03"), Contains("commit 02"), Contains("commit 01"), diff --git a/pkg/integration/tests/interactive_rebase/mid_rebase_range_select.go b/pkg/integration/tests/interactive_rebase/mid_rebase_range_select.go index c94b6329573..c5574748ea8 100644 --- a/pkg/integration/tests/interactive_rebase/mid_rebase_range_select.go +++ b/pkg/integration/tests/interactive_rebase/mid_rebase_range_select.go @@ -24,11 +24,13 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ // Start a rebase Press(keys.Universal.Edit). TopLines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("commit 10"), Contains("pick").Contains("commit 09"), Contains("pick").Contains("commit 08"), Contains("pick").Contains("commit 07"), Contains("pick").Contains("commit 06"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 05").IsSelected(), Contains("commit 04"), ). @@ -36,61 +38,73 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ // perform various actions on a range of commits Press(keys.Universal.RangeSelectUp). TopLines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("commit 10"), Contains("pick").Contains("commit 09"), Contains("pick").Contains("commit 08"), Contains("pick").Contains("commit 07").IsSelected(), Contains("pick").Contains("commit 06").IsSelected(), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 05"), Contains("commit 04"), ). Press(keys.Commits.MarkCommitAsFixup). TopLines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("commit 10"), Contains("pick").Contains("commit 09"), Contains("pick").Contains("commit 08"), Contains("fixup").Contains("commit 07").IsSelected(), Contains("fixup").Contains("commit 06").IsSelected(), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 05"), Contains("commit 04"), ). Press(keys.Commits.PickCommit). TopLines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("commit 10"), Contains("pick").Contains("commit 09"), Contains("pick").Contains("commit 08"), Contains("pick").Contains("commit 07").IsSelected(), Contains("pick").Contains("commit 06").IsSelected(), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 05"), Contains("commit 04"), ). Press(keys.Universal.Edit). TopLines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("commit 10"), Contains("pick").Contains("commit 09"), Contains("pick").Contains("commit 08"), Contains("edit").Contains("commit 07").IsSelected(), Contains("edit").Contains("commit 06").IsSelected(), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 05"), Contains("commit 04"), ). Press(keys.Commits.SquashDown). TopLines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("commit 10"), Contains("pick").Contains("commit 09"), Contains("pick").Contains("commit 08"), Contains("squash").Contains("commit 07").IsSelected(), Contains("squash").Contains("commit 06").IsSelected(), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 05"), Contains("commit 04"), ). Press(keys.Commits.MoveDownCommit). TopLines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("commit 10"), Contains("pick").Contains("commit 09"), Contains("pick").Contains("commit 08"), Contains("squash").Contains("commit 07").IsSelected(), Contains("squash").Contains("commit 06").IsSelected(), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 05"), Contains("commit 04"), ). @@ -99,31 +113,37 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ }). Press(keys.Commits.MoveUpCommit). TopLines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("commit 10"), Contains("pick").Contains("commit 09"), Contains("squash").Contains("commit 07").IsSelected(), Contains("squash").Contains("commit 06").IsSelected(), Contains("pick").Contains("commit 08"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 05"), Contains("commit 04"), ). Press(keys.Commits.MoveUpCommit). TopLines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("commit 10"), Contains("squash").Contains("commit 07").IsSelected(), Contains("squash").Contains("commit 06").IsSelected(), Contains("pick").Contains("commit 09"), Contains("pick").Contains("commit 08"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 05"), Contains("commit 04"), ). Press(keys.Commits.MoveUpCommit). TopLines( + Contains("--- Pending rebase todos ---"), Contains("squash").Contains("commit 07").IsSelected(), Contains("squash").Contains("commit 06").IsSelected(), Contains("pick").Contains("commit 10"), Contains("pick").Contains("commit 09"), Contains("pick").Contains("commit 08"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 05"), Contains("commit 04"), ). @@ -132,11 +152,13 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ t.ExpectToast(Contains("Disabled: Cannot move any further")) }). TopLines( + Contains("--- Pending rebase todos ---"), Contains("squash").Contains("commit 07").IsSelected(), Contains("squash").Contains("commit 06").IsSelected(), Contains("pick").Contains("commit 10"), Contains("pick").Contains("commit 09"), Contains("pick").Contains("commit 08"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 05"), Contains("commit 04"), ). @@ -145,11 +167,13 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("commit 08")). Press(keys.Universal.RangeSelectDown). TopLines( + Contains("--- Pending rebase todos ---"), Contains("squash").Contains("commit 07"), Contains("squash").Contains("commit 06"), Contains("pick").Contains("commit 10"), Contains("pick").Contains("commit 09"), Contains("pick").Contains("commit 08").IsSelected(), + Contains("--- Commits ---").IsSelected(), Contains("<-- YOU ARE HERE --- commit 05").IsSelected(), Contains("commit 04"), ). @@ -158,11 +182,13 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ t.ExpectToast(Contains("Disabled: When rebasing, this action only works on a selection of TODO commits.")) }). TopLines( + Contains("--- Pending rebase todos ---"), Contains("squash").Contains("commit 07"), Contains("squash").Contains("commit 06"), Contains("pick").Contains("commit 10"), Contains("pick").Contains("commit 09"), Contains("pick").Contains("commit 08").IsSelected(), + Contains("--- Commits ---").IsSelected(), Contains("<-- YOU ARE HERE --- commit 05").IsSelected(), Contains("commit 04"), ). diff --git a/pkg/integration/tests/interactive_rebase/move_in_rebase.go b/pkg/integration/tests/interactive_rebase/move_in_rebase.go index 48b74a7a4c5..56f34e4896c 100644 --- a/pkg/integration/tests/interactive_rebase/move_in_rebase.go +++ b/pkg/integration/tests/interactive_rebase/move_in_rebase.go @@ -25,24 +25,30 @@ var MoveInRebase = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("commit 01")). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit 04"), Contains("commit 03"), Contains("commit 02"), + Contains("--- Commits ---"), Contains("YOU ARE HERE").Contains("commit 01").IsSelected(), ). SelectPreviousItem(). Press(keys.Commits.MoveUpCommit). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit 04"), Contains("commit 02").IsSelected(), Contains("commit 03"), + Contains("--- Commits ---"), Contains("YOU ARE HERE").Contains("commit 01"), ). Press(keys.Commits.MoveUpCommit). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit 02").IsSelected(), Contains("commit 04"), Contains("commit 03"), + Contains("--- Commits ---"), Contains("YOU ARE HERE").Contains("commit 01"), ). // assert we can't move past the top @@ -51,23 +57,29 @@ var MoveInRebase = NewIntegrationTest(NewIntegrationTestArgs{ t.ExpectToast(Contains("Disabled: Cannot move any further")) }). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit 02").IsSelected(), Contains("commit 04"), Contains("commit 03"), + Contains("--- Commits ---"), Contains("YOU ARE HERE").Contains("commit 01"), ). Press(keys.Commits.MoveDownCommit). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit 04"), Contains("commit 02").IsSelected(), Contains("commit 03"), + Contains("--- Commits ---"), Contains("YOU ARE HERE").Contains("commit 01"), ). Press(keys.Commits.MoveDownCommit). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit 04"), Contains("commit 03"), Contains("commit 02").IsSelected(), + Contains("--- Commits ---"), Contains("YOU ARE HERE").Contains("commit 01"), ). // assert we can't move past the bottom @@ -76,17 +88,21 @@ var MoveInRebase = NewIntegrationTest(NewIntegrationTestArgs{ t.ExpectToast(Contains("Disabled: Cannot move any further")) }). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit 04"), Contains("commit 03"), Contains("commit 02").IsSelected(), + Contains("--- Commits ---"), Contains("YOU ARE HERE").Contains("commit 01"), ). // move it back up one so that we land in a different order than we started with Press(keys.Commits.MoveUpCommit). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit 04"), Contains("commit 02").IsSelected(), Contains("commit 03"), + Contains("--- Commits ---"), Contains("YOU ARE HERE").Contains("commit 01"), ). Tap(func() { diff --git a/pkg/integration/tests/interactive_rebase/move_update_ref_todo.go b/pkg/integration/tests/interactive_rebase/move_update_ref_todo.go index 3dbfcd9cb90..b0025ebbfc5 100644 --- a/pkg/integration/tests/interactive_rebase/move_update_ref_todo.go +++ b/pkg/integration/tests/interactive_rebase/move_update_ref_todo.go @@ -26,24 +26,28 @@ var MoveUpdateRefTodo = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("commit 01")). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("CI commit 06"), Contains("pick").Contains("CI commit 05"), Contains("pick").Contains("CI commit 04"), Contains("update-ref").Contains("branch1"), Contains("pick").Contains("CI commit 03"), Contains("pick").Contains("CI commit 02"), + Contains("--- Commits ---"), Contains("CI ◯ <-- YOU ARE HERE --- commit 01"), ). NavigateToLine(Contains("update-ref")). Press(keys.Commits.MoveUpCommit). Press(keys.Commits.MoveUpCommit). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("CI commit 06"), Contains("update-ref").Contains("branch1"), Contains("pick").Contains("CI commit 05"), Contains("pick").Contains("CI commit 04"), Contains("pick").Contains("CI commit 03"), Contains("pick").Contains("CI commit 02"), + Contains("--- Commits ---"), Contains("CI ◯ <-- YOU ARE HERE --- commit 01"), ). Tap(func() { diff --git a/pkg/integration/tests/interactive_rebase/pick_rescheduled.go b/pkg/integration/tests/interactive_rebase/pick_rescheduled.go index bd0f385f939..c37304b8ed7 100644 --- a/pkg/integration/tests/interactive_rebase/pick_rescheduled.go +++ b/pkg/integration/tests/interactive_rebase/pick_rescheduled.go @@ -26,8 +26,10 @@ var PickRescheduled = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("one")). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("three"), Contains("pick").Contains("two"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- one").IsSelected(), ). Tap(func() { @@ -39,7 +41,9 @@ var PickRescheduled = NewIntegrationTest(NewIntegrationTestArgs{ Confirm() }). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("three"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- two"), Contains("one"), ) diff --git a/pkg/integration/tests/interactive_rebase/quick_start.go b/pkg/integration/tests/interactive_rebase/quick_start.go index d0454d6cf74..ad36570f3df 100644 --- a/pkg/integration/tests/interactive_rebase/quick_start.go +++ b/pkg/integration/tests/interactive_rebase/quick_start.go @@ -73,8 +73,10 @@ var QuickStart = NewIntegrationTest(NewIntegrationTestArgs{ // Verify quick start picks the last commit on the main branch Press(keys.Commits.StartInteractiveRebase). Lines( + Contains("--- Pending rebase todos ---"), Contains("feature-branch two").IsSelected(), Contains("feature-branch one"), + Contains("--- Commits ---"), Contains("last main commit").Contains("YOU ARE HERE"), Contains("initial commit"), ). @@ -104,7 +106,9 @@ var QuickStart = NewIntegrationTest(NewIntegrationTestArgs{ ). Press(keys.Commits.StartInteractiveRebase). Lines( + Contains("--- Pending rebase todos ---"), Contains("branch-with-merge three").IsSelected(), + Contains("--- Commits ---"), Contains("Merge branch 'branch-to-merge'").Contains("YOU ARE HERE"), Contains("branch-to-merge two"), Contains("branch-to-merge one"), diff --git a/pkg/integration/tests/interactive_rebase/quick_start_keep_selection.go b/pkg/integration/tests/interactive_rebase/quick_start_keep_selection.go index e17d59fc38b..63f90b87a73 100644 --- a/pkg/integration/tests/interactive_rebase/quick_start_keep_selection.go +++ b/pkg/integration/tests/interactive_rebase/quick_start_keep_selection.go @@ -39,6 +39,7 @@ var QuickStartKeepSelection = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("commit 02")). Press(keys.Commits.StartInteractiveRebase). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("CI commit 07"), Contains("pick").Contains("CI commit 06"), Contains("pick").Contains("CI commit 05"), @@ -46,6 +47,7 @@ var QuickStartKeepSelection = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("CI commit 04"), Contains("pick").Contains("CI commit 03"), Contains("CI commit 02").IsSelected(), + Contains("--- Commits ---"), Contains("CI <-- YOU ARE HERE --- commit 01"), ) }, diff --git a/pkg/integration/tests/interactive_rebase/quick_start_keep_selection_range.go b/pkg/integration/tests/interactive_rebase/quick_start_keep_selection_range.go index 12c2a87aac8..31cec80ee4b 100644 --- a/pkg/integration/tests/interactive_rebase/quick_start_keep_selection_range.go +++ b/pkg/integration/tests/interactive_rebase/quick_start_keep_selection_range.go @@ -43,6 +43,7 @@ var QuickStartKeepSelectionRange = NewIntegrationTest(NewIntegrationTestArgs{ ). Press(keys.Commits.StartInteractiveRebase). Lines( + Contains("--- Pending rebase todos ---"), Contains("CI commit 07"), Contains("CI commit 06"), Contains("update-ref").Contains("branch2"), @@ -51,6 +52,7 @@ var QuickStartKeepSelectionRange = NewIntegrationTest(NewIntegrationTestArgs{ Contains("update-ref").Contains("branch1").IsSelected(), Contains("CI commit 03").IsSelected(), Contains("CI commit 02").IsSelected(), + Contains("--- Commits ---"), Contains("CI <-- YOU ARE HERE --- commit 01"), ) }, diff --git a/pkg/integration/tests/interactive_rebase/rebase.go b/pkg/integration/tests/interactive_rebase/rebase.go index 2b279a22e56..93cf56e9436 100644 --- a/pkg/integration/tests/interactive_rebase/rebase.go +++ b/pkg/integration/tests/interactive_rebase/rebase.go @@ -34,50 +34,60 @@ var Rebase = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("first commit to edit")). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), MatchesRegexp("pick.*commit to fixup"), MatchesRegexp("pick.*commit to drop"), MatchesRegexp("pick.*second commit to edit"), MatchesRegexp("pick.*commit to squash"), + Contains("--- Commits ---"), MatchesRegexp("YOU ARE HERE.*first commit to edit").IsSelected(), Contains("initial commit"), ). SelectPreviousItem(). Press(keys.Commits.SquashDown). Lines( + Contains("--- Pending rebase todos ---"), MatchesRegexp("pick.*commit to fixup"), MatchesRegexp("pick.*commit to drop"), MatchesRegexp("pick.*second commit to edit"), MatchesRegexp("squash.*commit to squash").IsSelected(), + Contains("--- Commits ---"), MatchesRegexp("YOU ARE HERE.*first commit to edit"), Contains("initial commit"), ). SelectPreviousItem(). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), MatchesRegexp("pick.*commit to fixup"), MatchesRegexp("pick.*commit to drop"), MatchesRegexp("edit.*second commit to edit").IsSelected(), MatchesRegexp("squash.*commit to squash"), + Contains("--- Commits ---"), MatchesRegexp("YOU ARE HERE.*first commit to edit"), Contains("initial commit"), ). SelectPreviousItem(). Press(keys.Universal.Remove). Lines( + Contains("--- Pending rebase todos ---"), MatchesRegexp("pick.*commit to fixup"), MatchesRegexp("drop.*commit to drop").IsSelected(), MatchesRegexp("edit.*second commit to edit"), MatchesRegexp("squash.*commit to squash"), + Contains("--- Commits ---"), MatchesRegexp("YOU ARE HERE.*first commit to edit"), Contains("initial commit"), ). SelectPreviousItem(). Press(keys.Commits.MarkCommitAsFixup). Lines( + Contains("--- Pending rebase todos ---"), MatchesRegexp("fixup.*commit to fixup").IsSelected(), MatchesRegexp("drop.*commit to drop"), MatchesRegexp("edit.*second commit to edit"), MatchesRegexp("squash.*commit to squash"), + Contains("--- Commits ---"), MatchesRegexp("YOU ARE HERE.*first commit to edit"), Contains("initial commit"), ). @@ -85,8 +95,10 @@ var Rebase = NewIntegrationTest(NewIntegrationTestArgs{ t.Common().ContinueRebase() }). Lines( + Contains("--- Pending rebase todos ---"), MatchesRegexp("fixup.*commit to fixup").IsSelected(), MatchesRegexp("drop.*commit to drop"), + Contains("--- Commits ---"), MatchesRegexp("YOU ARE HERE.*second commit to edit"), MatchesRegexp("first commit to edit"), Contains("initial commit"), diff --git a/pkg/integration/tests/interactive_rebase/revert_during_rebase_when_stopped_on_edit.go b/pkg/integration/tests/interactive_rebase/revert_during_rebase_when_stopped_on_edit.go index 7d49f06db5f..5ec043d62f2 100644 --- a/pkg/integration/tests/interactive_rebase/revert_during_rebase_when_stopped_on_edit.go +++ b/pkg/integration/tests/interactive_rebase/revert_during_rebase_when_stopped_on_edit.go @@ -30,7 +30,9 @@ var RevertDuringRebaseWhenStoppedOnEdit = NewIntegrationTest(NewIntegrationTestA NavigateToLine(Contains("commit 03")). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("commit 04"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 03").IsSelected(), Contains("commit 02"), Contains("commit 01"), @@ -47,7 +49,9 @@ var RevertDuringRebaseWhenStoppedOnEdit = NewIntegrationTest(NewIntegrationTestA Confirm() }). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("commit 04"), + Contains("--- Commits ---"), Contains(`<-- YOU ARE HERE --- Revert "commit 01"`), Contains(`Revert "commit 02"`), Contains("commit 03"), diff --git a/pkg/integration/tests/interactive_rebase/revert_multiple_commits_in_interactive_rebase.go b/pkg/integration/tests/interactive_rebase/revert_multiple_commits_in_interactive_rebase.go index 3d3aa42623c..039619d4c0e 100644 --- a/pkg/integration/tests/interactive_rebase/revert_multiple_commits_in_interactive_rebase.go +++ b/pkg/integration/tests/interactive_rebase/revert_multiple_commits_in_interactive_rebase.go @@ -50,10 +50,13 @@ var RevertMultipleCommitsInInteractiveRebase = NewIntegrationTest(NewIntegration Confirm() }). Lines( + Contains("--- Pending rebase todos ---"), Contains("CI unrelated change 3"), Contains("CI unrelated change 2"), + Contains("--- Pending reverts ---"), Contains("revert").Contains("CI unrelated change 1"), Contains("revert").Contains("CI <-- CONFLICT --- add first line"), + Contains("--- Commits ---"), Contains("CI ◯ add second line"), Contains("CI ◯ add first line"), Contains("CI ◯ unrelated change 1"), @@ -80,8 +83,10 @@ var RevertMultipleCommitsInInteractiveRebase = NewIntegrationTest(NewIntegration t.Views().Commits(). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("CI unrelated change 3"), Contains("pick").Contains("CI unrelated change 2"), + Contains("--- Commits ---"), Contains(`CI ◯ <-- YOU ARE HERE --- Revert "unrelated change 1"`), Contains(`CI ◯ Revert "add first line"`), Contains("CI ◯ add second line"), diff --git a/pkg/integration/tests/interactive_rebase/revert_single_commit_in_interactive_rebase.go b/pkg/integration/tests/interactive_rebase/revert_single_commit_in_interactive_rebase.go index 05849f21c43..84975c1d95c 100644 --- a/pkg/integration/tests/interactive_rebase/revert_single_commit_in_interactive_rebase.go +++ b/pkg/integration/tests/interactive_rebase/revert_single_commit_in_interactive_rebase.go @@ -45,9 +45,12 @@ var RevertSingleCommitInInteractiveRebase = NewIntegrationTest(NewIntegrationTes Cancel() // stay in commits panel }). Lines( + Contains("--- Pending rebase todos ---"), Contains("CI unrelated change 2"), Contains("CI unrelated change 1"), + Contains("--- Pending reverts ---"), Contains("revert").Contains("CI <-- CONFLICT --- add first line"), + Contains("--- Commits ---"), Contains("CI ◯ add second line"), Contains("CI ◯ add first line").IsSelected(), Contains("CI ◯ add empty file"), @@ -81,8 +84,10 @@ var RevertSingleCommitInInteractiveRebase = NewIntegrationTest(NewIntegrationTes t.Views().Commits(). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("CI unrelated change 2"), Contains("pick").Contains("CI unrelated change 1"), + Contains("--- Commits ---"), Contains(`CI ◯ <-- YOU ARE HERE --- Revert "add first line"`), Contains("CI ◯ add second line"), Contains("CI ◯ add first line"), diff --git a/pkg/integration/tests/interactive_rebase/reword_commit_with_editor_and_fail.go b/pkg/integration/tests/interactive_rebase/reword_commit_with_editor_and_fail.go index 99bac839dcc..6633f9378cc 100644 --- a/pkg/integration/tests/interactive_rebase/reword_commit_with_editor_and_fail.go +++ b/pkg/integration/tests/interactive_rebase/reword_commit_with_editor_and_fail.go @@ -33,7 +33,9 @@ var RewordCommitWithEditorAndFail = NewIntegrationTest(NewIntegrationTestArgs{ Confirm() }). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit 03"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 02").IsSelected(), Contains("commit 01"), ) diff --git a/pkg/integration/tests/interactive_rebase/reword_you_are_here_commit.go b/pkg/integration/tests/interactive_rebase/reword_you_are_here_commit.go index d7763c57357..ee0ff81c438 100644 --- a/pkg/integration/tests/interactive_rebase/reword_you_are_here_commit.go +++ b/pkg/integration/tests/interactive_rebase/reword_you_are_here_commit.go @@ -25,7 +25,9 @@ var RewordYouAreHereCommit = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("commit 02")). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit 03"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 02").IsSelected(), Contains("commit 01"), ). @@ -39,7 +41,9 @@ var RewordYouAreHereCommit = NewIntegrationTest(NewIntegrationTestArgs{ Confirm() }). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit 03"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- renamed 02").IsSelected(), Contains("commit 01"), ) diff --git a/pkg/integration/tests/interactive_rebase/reword_you_are_here_commit_with_editor.go b/pkg/integration/tests/interactive_rebase/reword_you_are_here_commit_with_editor.go index 4d654e1ddfe..3ad86bde87c 100644 --- a/pkg/integration/tests/interactive_rebase/reword_you_are_here_commit_with_editor.go +++ b/pkg/integration/tests/interactive_rebase/reword_you_are_here_commit_with_editor.go @@ -27,7 +27,9 @@ var RewordYouAreHereCommitWithEditor = NewIntegrationTest(NewIntegrationTestArgs NavigateToLine(Contains("commit 02")). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit 03"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit 02").IsSelected(), Contains("commit 01"), ). @@ -39,7 +41,9 @@ var RewordYouAreHereCommitWithEditor = NewIntegrationTest(NewIntegrationTestArgs Confirm() }). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit 03"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- renamed 02").IsSelected(), Contains("commit 01"), ) diff --git a/pkg/integration/tests/interactive_rebase/shared.go b/pkg/integration/tests/interactive_rebase/shared.go index d2f75622f11..ea6626fd652 100644 --- a/pkg/integration/tests/interactive_rebase/shared.go +++ b/pkg/integration/tests/interactive_rebase/shared.go @@ -9,8 +9,10 @@ func handleConflictsFromSwap(t *TestDriver, expectedCommand string) { t.Views().Commits(). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("commit two"), Contains(expectedCommand).Contains("<-- CONFLICT --- commit three"), + Contains("--- Commits ---"), Contains("commit one"), ) diff --git a/pkg/integration/tests/interactive_rebase/show_exec_todos.go b/pkg/integration/tests/interactive_rebase/show_exec_todos.go index 82f45992450..55a9bead0e2 100644 --- a/pkg/integration/tests/interactive_rebase/show_exec_todos.go +++ b/pkg/integration/tests/interactive_rebase/show_exec_todos.go @@ -31,8 +31,10 @@ var ShowExecTodos = NewIntegrationTest(NewIntegrationTestArgs{ t.ExpectPopup().Alert().Title(Equals("Error")).Content(Contains("Rebasing (2/4)Executing: false")).Confirm() }). Lines( + Contains("--- Pending rebase todos ---"), Contains("exec").Contains("false"), Contains("pick").Contains("CI commit 03"), + Contains("--- Commits ---"), Contains("CI ◯ <-- YOU ARE HERE --- commit 02"), Contains("CI ◯ commit 01"), ). @@ -41,6 +43,8 @@ var ShowExecTodos = NewIntegrationTest(NewIntegrationTestArgs{ t.ExpectPopup().Alert().Title(Equals("Error")).Content(Contains("exit status 1")).Confirm() }). Lines( + Contains("--- Pending rebase todos ---"), + Contains("--- Commits ---"), Contains("CI ◯ <-- YOU ARE HERE --- commit 03"), Contains("CI ◯ commit 02"), Contains("CI ◯ commit 01"), diff --git a/pkg/integration/tests/interactive_rebase/swap_in_rebase_with_conflict.go b/pkg/integration/tests/interactive_rebase/swap_in_rebase_with_conflict.go index f330fd5cf83..9eb045909c1 100644 --- a/pkg/integration/tests/interactive_rebase/swap_in_rebase_with_conflict.go +++ b/pkg/integration/tests/interactive_rebase/swap_in_rebase_with_conflict.go @@ -29,15 +29,19 @@ var SwapInRebaseWithConflict = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("commit one")). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit three"), Contains("commit two"), + Contains("--- Commits ---"), Contains("YOU ARE HERE").Contains("commit one").IsSelected(), ). SelectPreviousItem(). Press(keys.Commits.MoveUpCommit). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit two").IsSelected(), Contains("commit three"), + Contains("--- Commits ---"), Contains("YOU ARE HERE").Contains("commit one"), ). Tap(func() { diff --git a/pkg/integration/tests/interactive_rebase/swap_in_rebase_with_conflict_and_edit.go b/pkg/integration/tests/interactive_rebase/swap_in_rebase_with_conflict_and_edit.go index 662a8e8cfc1..23f796fd996 100644 --- a/pkg/integration/tests/interactive_rebase/swap_in_rebase_with_conflict_and_edit.go +++ b/pkg/integration/tests/interactive_rebase/swap_in_rebase_with_conflict_and_edit.go @@ -29,15 +29,19 @@ var SwapInRebaseWithConflictAndEdit = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("commit one")). Press(keys.Universal.Edit). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit three"), Contains("commit two"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit one").IsSelected(), ). NavigateToLine(Contains("commit two")). Press(keys.Commits.MoveUpCommit). Lines( + Contains("--- Pending rebase todos ---"), Contains("commit two").IsSelected(), Contains("commit three"), + Contains("--- Commits ---"), Contains("<-- YOU ARE HERE --- commit one"), ). NavigateToLine(Contains("commit three")). diff --git a/pkg/integration/tests/interactive_rebase/view_files_of_todo_entries.go b/pkg/integration/tests/interactive_rebase/view_files_of_todo_entries.go index 4140e1a0fca..a500ba210ba 100644 --- a/pkg/integration/tests/interactive_rebase/view_files_of_todo_entries.go +++ b/pkg/integration/tests/interactive_rebase/view_files_of_todo_entries.go @@ -28,9 +28,11 @@ var ViewFilesOfTodoEntries = NewIntegrationTest(NewIntegrationTestArgs{ Focus(). Press(keys.Commits.StartInteractiveRebase). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("CI commit 03").IsSelected(), Contains("update-ref").Contains("branch1"), Contains("pick").Contains("CI commit 02"), + Contains("--- Commits ---"), Contains("CI <-- YOU ARE HERE --- commit 01"), ). Press(keys.Universal.GoInto) diff --git a/pkg/integration/tests/sync/pull_rebase_interactive_conflict.go b/pkg/integration/tests/sync/pull_rebase_interactive_conflict.go index 7f1e7721aa7..2bb39e14fd4 100644 --- a/pkg/integration/tests/sync/pull_rebase_interactive_conflict.go +++ b/pkg/integration/tests/sync/pull_rebase_interactive_conflict.go @@ -48,8 +48,10 @@ var PullRebaseInteractiveConflict = NewIntegrationTest(NewIntegrationTestArgs{ t.Views().Commits(). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("five"), Contains("pick").Contains("CONFLICT").Contains("four"), + Contains("--- Commits ---"), Contains("three"), Contains("two"), Contains("one"), diff --git a/pkg/integration/tests/sync/pull_rebase_interactive_conflict_drop.go b/pkg/integration/tests/sync/pull_rebase_interactive_conflict_drop.go index d9dd51c4593..ad7a4806f90 100644 --- a/pkg/integration/tests/sync/pull_rebase_interactive_conflict_drop.go +++ b/pkg/integration/tests/sync/pull_rebase_interactive_conflict_drop.go @@ -49,16 +49,20 @@ var PullRebaseInteractiveConflictDrop = NewIntegrationTest(NewIntegrationTestArg t.Views().Commits(). Focus(). Lines( + Contains("--- Pending rebase todos ---"), Contains("pick").Contains("five").IsSelected(), Contains("pick").Contains("CONFLICT").Contains("four"), + Contains("--- Commits ---"), Contains("three"), Contains("two"), Contains("one"), ). Press(keys.Universal.Remove). Lines( + Contains("--- Pending rebase todos ---"), Contains("drop").Contains("five").IsSelected(), Contains("pick").Contains("CONFLICT").Contains("four"), + Contains("--- Commits ---"), Contains("three"), Contains("two"), Contains("one"), From 027f33cf7b594723b3e7cf9e5ca30d2c4f2cb248 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 5 Apr 2025 13:43:50 +0200 Subject: [PATCH 4/4] Remove the "YOU ARE HERE" marker Now that we have sections, it is no longer needed. Keep the "<-- CONFLICTS" marker though. --- pkg/gui/context/local_commits_context.go | 2 - pkg/gui/context/sub_commits_context.go | 1 - pkg/gui/presentation/commits.go | 18 +-------- pkg/gui/presentation/commits_test.go | 39 +------------------ pkg/i18n/english.go | 2 - .../cherry_pick/cherry_pick_during_rebase.go | 4 +- .../advanced_interactive_rebase.go | 6 +-- .../amend_head_commit_during_rebase.go | 4 +- .../amend_non_head_commit_during_rebase.go | 2 +- .../delete_update_ref_todo.go | 4 +- .../dont_show_branch_heads_for_todo_items.go | 2 +- .../drop_todo_commit_with_update_ref.go | 2 +- .../interactive_rebase/edit_and_auto_amend.go | 2 +- .../interactive_rebase/edit_first_commit.go | 2 +- .../edit_last_commit_of_stacked_branch.go | 2 +- .../edit_non_todo_commit_during_rebase.go | 2 +- ...nge_select_down_to_merge_outside_rebase.go | 2 +- .../edit_range_select_outside_rebase.go | 2 +- .../interactive_rebase_of_copied_branch.go | 2 +- .../mid_rebase_range_select.go | 26 ++++++------- .../interactive_rebase/move_in_rebase.go | 18 ++++----- .../move_update_ref_todo.go | 4 +- .../interactive_rebase/pick_rescheduled.go | 4 +- .../tests/interactive_rebase/quick_start.go | 4 +- .../quick_start_keep_selection.go | 2 +- .../quick_start_keep_selection_range.go | 2 +- .../tests/interactive_rebase/rebase.go | 12 +++--- ...vert_during_rebase_when_stopped_on_edit.go | 4 +- ..._multiple_commits_in_interactive_rebase.go | 2 +- ...ert_single_commit_in_interactive_rebase.go | 2 +- .../reword_commit_with_editor_and_fail.go | 2 +- .../reword_you_are_here_commit.go | 4 +- .../reword_you_are_here_commit_with_editor.go | 4 +- .../interactive_rebase/show_exec_todos.go | 4 +- .../swap_in_rebase_with_conflict.go | 4 +- .../swap_in_rebase_with_conflict_and_edit.go | 4 +- .../view_files_of_todo_entries.go | 2 +- 37 files changed, 75 insertions(+), 129 deletions(-) diff --git a/pkg/gui/context/local_commits_context.go b/pkg/gui/context/local_commits_context.go index 6e69046c1cd..2414501845c 100644 --- a/pkg/gui/context/local_commits_context.go +++ b/pkg/gui/context/local_commits_context.go @@ -41,7 +41,6 @@ func NewLocalCommitsContext(c *ContextCommon) *LocalCommitsContext { } } - showYouAreHereLabel := c.Model().WorkingTreeStateAtLastCommitRefresh.CanShowTodos() hasRebaseUpdateRefsConfig := c.Git().Config.GetRebaseUpdateRefs() return presentation.GetCommitListDisplayStrings( @@ -63,7 +62,6 @@ func NewLocalCommitsContext(c *ContextCommon) *LocalCommitsContext { endIdx, shouldShowGraph(c), c.Model().BisectInfo, - showYouAreHereLabel, ) } diff --git a/pkg/gui/context/sub_commits_context.go b/pkg/gui/context/sub_commits_context.go index b3b3fd1b476..1eed352eb87 100644 --- a/pkg/gui/context/sub_commits_context.go +++ b/pkg/gui/context/sub_commits_context.go @@ -77,7 +77,6 @@ func NewSubCommitsContext( endIdx, shouldShowGraph(c), git_commands.NewNullBisectInfo(), - false, ) } diff --git a/pkg/gui/presentation/commits.go b/pkg/gui/presentation/commits.go index 8296198fc9a..f265979daa0 100644 --- a/pkg/gui/presentation/commits.go +++ b/pkg/gui/presentation/commits.go @@ -56,7 +56,6 @@ func GetCommitListDisplayStrings( endIdx int, showGraph bool, bisectInfo *git_commands.BisectInfo, - showYouAreHereLabel bool, ) [][]string { mutex.Lock() defer mutex.Unlock() @@ -185,11 +184,6 @@ func GetCommitListDisplayStrings( for i, commit := range filteredCommits { unfilteredIdx := i + startIdx bisectStatus = getBisectStatus(unfilteredIdx, commit.Hash, bisectInfo, bisectBounds) - isYouAreHereCommit := false - if showYouAreHereLabel && (commit.Status == models.StatusConflicted || unfilteredIdx == rebaseOffset) { - isYouAreHereCommit = true - showYouAreHereLabel = false - } isMarkedBaseCommit := commit.Hash != "" && commit.Hash == markedBaseCommit if isMarkedBaseCommit { willBeRebased = true @@ -211,7 +205,6 @@ func GetCommitListDisplayStrings( fullDescription, bisectStatus, bisectInfo, - isYouAreHereCommit, )) } return lines @@ -364,7 +357,6 @@ func displayCommit( fullDescription bool, bisectStatus BisectStatus, bisectInfo *git_commands.BisectInfo, - isYouAreHereCommit bool, ) []string { bisectString := getBisectStatusText(bisectStatus, bisectInfo) @@ -427,14 +419,8 @@ func displayCommit( } mark := "" - if isYouAreHereCommit { - color := style.FgYellow - text := common.Tr.YouAreHere - if commit.Status == models.StatusConflicted { - color = style.FgRed - text = common.Tr.ConflictLabel - } - youAreHere := color.Sprintf("<-- %s ---", text) + if commit.Status == models.StatusConflicted { + youAreHere := style.FgRed.Sprintf("<-- %s ---", common.Tr.ConflictLabel) mark = fmt.Sprintf("%s ", youAreHere) } else if isMarkedBaseCommit { rebaseFromHere := style.FgYellow.Sprint(common.Tr.MarkedCommitMarker) diff --git a/pkg/gui/presentation/commits_test.go b/pkg/gui/presentation/commits_test.go index edf147b9213..58a2c203254 100644 --- a/pkg/gui/presentation/commits_test.go +++ b/pkg/gui/presentation/commits_test.go @@ -40,7 +40,6 @@ func TestGetCommitListDisplayStrings(t *testing.T) { endIdx int showGraph bool bisectInfo *git_commands.BisectInfo - showYouAreHereLabel bool expected string focus bool }{ @@ -223,12 +222,11 @@ func TestGetCommitListDisplayStrings(t *testing.T) { showGraph: true, bisectInfo: git_commands.NewNullBisectInfo(), cherryPickedCommitHashSet: set.New[string](), - showYouAreHereLabel: true, now: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), expected: formatExpected(` hash1 pick commit1 hash2 pick commit2 - hash3 ◯ <-- YOU ARE HERE --- commit3 + hash3 ◯ commit3 hash4 ◯ commit4 hash5 ◯ commit5 `), @@ -247,11 +245,10 @@ func TestGetCommitListDisplayStrings(t *testing.T) { showGraph: true, bisectInfo: git_commands.NewNullBisectInfo(), cherryPickedCommitHashSet: set.New[string](), - showYouAreHereLabel: true, now: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), expected: formatExpected(` hash2 pick commit2 - hash3 ◯ <-- YOU ARE HERE --- commit3 + hash3 ◯ commit3 hash4 ◯ commit4 hash5 ◯ commit5 `), @@ -270,7 +267,6 @@ func TestGetCommitListDisplayStrings(t *testing.T) { showGraph: true, bisectInfo: git_commands.NewNullBisectInfo(), cherryPickedCommitHashSet: set.New[string](), - showYouAreHereLabel: true, now: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), expected: formatExpected(` hash4 ◯ commit4 @@ -291,7 +287,6 @@ func TestGetCommitListDisplayStrings(t *testing.T) { showGraph: true, bisectInfo: git_commands.NewNullBisectInfo(), cherryPickedCommitHashSet: set.New[string](), - showYouAreHereLabel: true, now: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), expected: formatExpected(` hash1 pick commit1 @@ -312,7 +307,6 @@ func TestGetCommitListDisplayStrings(t *testing.T) { showGraph: true, bisectInfo: git_commands.NewNullBisectInfo(), cherryPickedCommitHashSet: set.New[string](), - showYouAreHereLabel: true, now: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), expected: formatExpected(` hash5 ◯ commit5 @@ -332,33 +326,12 @@ func TestGetCommitListDisplayStrings(t *testing.T) { showGraph: true, bisectInfo: git_commands.NewNullBisectInfo(), cherryPickedCommitHashSet: set.New[string](), - showYouAreHereLabel: true, now: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), expected: formatExpected(` hash1 pick commit1 hash2 pick commit2 `), }, - { - testName: "don't show YOU ARE HERE label when not asked for (e.g. in branches panel)", - commits: []*models.Commit{ - {Name: "commit1", Hash: "hash1", Parents: []string{"hash2"}, Action: todo.Pick}, - {Name: "commit2", Hash: "hash2", Parents: []string{"hash3"}}, - {Name: "commit3", Hash: "hash3", Parents: []string{"hash4"}}, - }, - startIdx: 0, - endIdx: 3, - showGraph: true, - bisectInfo: git_commands.NewNullBisectInfo(), - cherryPickedCommitHashSet: set.New[string](), - showYouAreHereLabel: false, - now: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), - expected: formatExpected(` - hash1 pick commit1 - hash2 ◯ commit2 - hash3 ◯ commit3 - `), - }, { testName: "graph in divergence view - all commits visible", commits: []*models.Commit{ @@ -376,7 +349,6 @@ func TestGetCommitListDisplayStrings(t *testing.T) { showGraph: true, bisectInfo: git_commands.NewNullBisectInfo(), cherryPickedCommitHashSet: set.New[string](), - showYouAreHereLabel: false, now: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), expected: formatExpected(` ↓ hash1r ◯ commit1 @@ -406,7 +378,6 @@ func TestGetCommitListDisplayStrings(t *testing.T) { showGraph: true, bisectInfo: git_commands.NewNullBisectInfo(), cherryPickedCommitHashSet: set.New[string](), - showYouAreHereLabel: false, now: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), expected: formatExpected(` ↓ hash3r ◯ │ commit3 @@ -434,7 +405,6 @@ func TestGetCommitListDisplayStrings(t *testing.T) { showGraph: true, bisectInfo: git_commands.NewNullBisectInfo(), cherryPickedCommitHashSet: set.New[string](), - showYouAreHereLabel: false, now: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), expected: formatExpected(` ↓ hash1r ◯ commit1 @@ -461,7 +431,6 @@ func TestGetCommitListDisplayStrings(t *testing.T) { showGraph: true, bisectInfo: git_commands.NewNullBisectInfo(), cherryPickedCommitHashSet: set.New[string](), - showYouAreHereLabel: false, now: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), expected: formatExpected(` ↑ hash2l ⏣─╮ commit2 @@ -487,7 +456,6 @@ func TestGetCommitListDisplayStrings(t *testing.T) { showGraph: true, bisectInfo: git_commands.NewNullBisectInfo(), cherryPickedCommitHashSet: set.New[string](), - showYouAreHereLabel: false, now: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), expected: formatExpected(` ↓ hash1r ◯ commit1 @@ -508,7 +476,6 @@ func TestGetCommitListDisplayStrings(t *testing.T) { showGraph: true, bisectInfo: git_commands.NewNullBisectInfo(), cherryPickedCommitHashSet: set.New[string](), - showYouAreHereLabel: false, now: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), expected: formatExpected(` ↑ hash1l ◯ commit1 @@ -530,7 +497,6 @@ func TestGetCommitListDisplayStrings(t *testing.T) { showGraph: true, bisectInfo: git_commands.NewNullBisectInfo(), cherryPickedCommitHashSet: set.New[string](), - showYouAreHereLabel: false, now: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), expected: formatExpected(` ↓ hash1r ◯ commit1 @@ -596,7 +562,6 @@ func TestGetCommitListDisplayStrings(t *testing.T) { s.endIdx, s.showGraph, s.bisectInfo, - s.showYouAreHereLabel, ) renderedLines, _ := utils.RenderDisplayStrings(result, nil) diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index e25bde0e4b6..ab9f7cdf4cb 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -348,7 +348,6 @@ type TranslationSet struct { PullRequestNoUpstream string ErrorOccurred string NoRoom string - YouAreHere string ConflictLabel string PendingRebaseTodosSectionHeader string PendingCherryPicksSectionHeader string @@ -1421,7 +1420,6 @@ func EnglishTranslationSet() *TranslationSet { PullRequestNoUpstream: "Cannot open a pull request for a branch with no upstream", ErrorOccurred: "An error occurred! Please create an issue at", NoRoom: "Not enough room", - YouAreHere: "YOU ARE HERE", ConflictLabel: "CONFLICT", PendingRebaseTodosSectionHeader: "Pending rebase todos", PendingCherryPicksSectionHeader: "Pending cherry-picks", diff --git a/pkg/integration/tests/cherry_pick/cherry_pick_during_rebase.go b/pkg/integration/tests/cherry_pick/cherry_pick_during_rebase.go index e6dfb3ef07c..bd64a746966 100644 --- a/pkg/integration/tests/cherry_pick/cherry_pick_during_rebase.go +++ b/pkg/integration/tests/cherry_pick/cherry_pick_during_rebase.go @@ -62,7 +62,7 @@ var CherryPickDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{ Contains("--- Pending rebase todos ---"), Contains("pick CI two"), Contains("--- Commits ---"), - Contains(" CI <-- YOU ARE HERE --- one").IsSelected(), + Contains(" CI one").IsSelected(), Contains(" CI base"), ). Press(keys.Commits.PasteCommits). @@ -79,7 +79,7 @@ var CherryPickDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{ Contains("--- Pending rebase todos ---"), Contains("pick CI two"), Contains("--- Commits ---"), - Contains(" CI <-- YOU ARE HERE --- three"), + Contains(" CI three"), Contains(" CI one"), Contains(" CI base"), ). diff --git a/pkg/integration/tests/interactive_rebase/advanced_interactive_rebase.go b/pkg/integration/tests/interactive_rebase/advanced_interactive_rebase.go index bcf84e59c4e..1162a20c7ef 100644 --- a/pkg/integration/tests/interactive_rebase/advanced_interactive_rebase.go +++ b/pkg/integration/tests/interactive_rebase/advanced_interactive_rebase.go @@ -48,7 +48,7 @@ var AdvancedInteractiveRebase = NewIntegrationTest(NewIntegrationTestArgs{ Contains("--- Pending rebase todos ---"), Contains(TOP_COMMIT), Contains("--- Commits ---"), - Contains(BASE_COMMIT).Contains("YOU ARE HERE"), + Contains(BASE_COMMIT), ). NavigateToLine(Contains(TOP_COMMIT)). Press(keys.Universal.Edit). @@ -56,7 +56,7 @@ var AdvancedInteractiveRebase = NewIntegrationTest(NewIntegrationTestArgs{ Contains("--- Pending rebase todos ---"), Contains(TOP_COMMIT).Contains("edit"), Contains("--- Commits ---"), - Contains(BASE_COMMIT).Contains("YOU ARE HERE"), + Contains(BASE_COMMIT), ). Tap(func() { t.Common().ContinueRebase() @@ -64,7 +64,7 @@ var AdvancedInteractiveRebase = NewIntegrationTest(NewIntegrationTestArgs{ Lines( Contains("--- Pending rebase todos ---"), Contains("--- Commits ---"), - Contains(TOP_COMMIT).Contains("YOU ARE HERE"), + Contains(TOP_COMMIT), Contains(BASE_COMMIT), ) }, diff --git a/pkg/integration/tests/interactive_rebase/amend_head_commit_during_rebase.go b/pkg/integration/tests/interactive_rebase/amend_head_commit_during_rebase.go index 5d24d2a0828..66be297f06f 100644 --- a/pkg/integration/tests/interactive_rebase/amend_head_commit_during_rebase.go +++ b/pkg/integration/tests/interactive_rebase/amend_head_commit_during_rebase.go @@ -27,7 +27,7 @@ var AmendHeadCommitDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{ Contains("--- Pending rebase todos ---"), Contains("commit 03"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 02").IsSelected(), + Contains("commit 02").IsSelected(), Contains("commit 01"), ) @@ -53,7 +53,7 @@ var AmendHeadCommitDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{ Contains("--- Pending rebase todos ---"), Contains("commit 03"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 02").IsSelected(), + Contains("commit 02").IsSelected(), Contains("commit 01"), ) diff --git a/pkg/integration/tests/interactive_rebase/amend_non_head_commit_during_rebase.go b/pkg/integration/tests/interactive_rebase/amend_non_head_commit_during_rebase.go index fca17bfb4ca..1216655e8d9 100644 --- a/pkg/integration/tests/interactive_rebase/amend_non_head_commit_during_rebase.go +++ b/pkg/integration/tests/interactive_rebase/amend_non_head_commit_during_rebase.go @@ -27,7 +27,7 @@ var AmendNonHeadCommitDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{ Contains("--- Pending rebase todos ---"), Contains("commit 03"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 02"), + Contains("commit 02"), Contains("commit 01"), ) diff --git a/pkg/integration/tests/interactive_rebase/delete_update_ref_todo.go b/pkg/integration/tests/interactive_rebase/delete_update_ref_todo.go index 28000bdb00c..4ae20160f81 100644 --- a/pkg/integration/tests/interactive_rebase/delete_update_ref_todo.go +++ b/pkg/integration/tests/interactive_rebase/delete_update_ref_todo.go @@ -34,7 +34,7 @@ var DeleteUpdateRefTodo = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("CI commit 03"), Contains("pick").Contains("CI commit 02"), Contains("--- Commits ---"), - Contains("CI ◯ <-- YOU ARE HERE --- commit 01"), + Contains("CI ◯ commit 01"), ). NavigateToLine(Contains("update-ref")). Press(keys.Universal.Remove). @@ -52,7 +52,7 @@ var DeleteUpdateRefTodo = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("CI commit 03").IsSelected(), Contains("pick").Contains("CI commit 02"), Contains("--- Commits ---"), - Contains("CI ◯ <-- YOU ARE HERE --- commit 01"), + Contains("CI ◯ commit 01"), ). NavigateToLine(Contains("commit 02")). Press(keys.Universal.Remove). diff --git a/pkg/integration/tests/interactive_rebase/dont_show_branch_heads_for_todo_items.go b/pkg/integration/tests/interactive_rebase/dont_show_branch_heads_for_todo_items.go index 8f26e680387..b0192c59fa8 100644 --- a/pkg/integration/tests/interactive_rebase/dont_show_branch_heads_for_todo_items.go +++ b/pkg/integration/tests/interactive_rebase/dont_show_branch_heads_for_todo_items.go @@ -49,7 +49,7 @@ var DontShowBranchHeadsForTodoItems = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("CI commit 06"), // no star on this entry, even though branch2 points to it Contains("pick").Contains("CI commit 05"), Contains("--- Commits ---"), - Contains("CI <-- YOU ARE HERE --- commit 04"), + Contains("CI commit 04"), Contains("CI commit 03"), Contains("CI * commit 02"), // this star is fine though Contains("CI commit 01"), diff --git a/pkg/integration/tests/interactive_rebase/drop_todo_commit_with_update_ref.go b/pkg/integration/tests/interactive_rebase/drop_todo_commit_with_update_ref.go index 8e596733d02..3dd44baaf0c 100644 --- a/pkg/integration/tests/interactive_rebase/drop_todo_commit_with_update_ref.go +++ b/pkg/integration/tests/interactive_rebase/drop_todo_commit_with_update_ref.go @@ -47,7 +47,7 @@ var DropTodoCommitWithUpdateRef = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("CI commit 04"), Contains("pick").Contains("CI commit 03"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 02").IsSelected(), + Contains("CI commit 02").IsSelected(), Contains("CI commit 01"), ). Tap(func() { diff --git a/pkg/integration/tests/interactive_rebase/edit_and_auto_amend.go b/pkg/integration/tests/interactive_rebase/edit_and_auto_amend.go index e07146a06a9..2107c8a5872 100644 --- a/pkg/integration/tests/interactive_rebase/edit_and_auto_amend.go +++ b/pkg/integration/tests/interactive_rebase/edit_and_auto_amend.go @@ -28,7 +28,7 @@ var EditAndAutoAmend = NewIntegrationTest(NewIntegrationTestArgs{ Contains("--- Pending rebase todos ---"), Contains("commit 03"), Contains("--- Commits ---"), - MatchesRegexp("YOU ARE HERE.*commit 02").IsSelected(), + Contains("commit 02").IsSelected(), Contains("commit 01"), ) diff --git a/pkg/integration/tests/interactive_rebase/edit_first_commit.go b/pkg/integration/tests/interactive_rebase/edit_first_commit.go index c30a1cfb126..f09b7f27d27 100644 --- a/pkg/integration/tests/interactive_rebase/edit_first_commit.go +++ b/pkg/integration/tests/interactive_rebase/edit_first_commit.go @@ -27,7 +27,7 @@ var EditFirstCommit = NewIntegrationTest(NewIntegrationTestArgs{ Contains("--- Pending rebase todos ---"), Contains("commit 02"), Contains("--- Commits ---"), - MatchesRegexp("YOU ARE HERE.*commit 01").IsSelected(), + Contains("commit 01").IsSelected(), ). Tap(func() { t.Common().ContinueRebase() diff --git a/pkg/integration/tests/interactive_rebase/edit_last_commit_of_stacked_branch.go b/pkg/integration/tests/interactive_rebase/edit_last_commit_of_stacked_branch.go index a4d7558fe1d..71c66799a23 100644 --- a/pkg/integration/tests/interactive_rebase/edit_last_commit_of_stacked_branch.go +++ b/pkg/integration/tests/interactive_rebase/edit_last_commit_of_stacked_branch.go @@ -42,7 +42,7 @@ var EditLastCommitOfStackedBranch = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("CI commit 04"), Contains("update-ref").Contains("branch1"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- * commit 03").IsSelected(), + Contains("CI * commit 03").IsSelected(), Contains("CI commit 02"), Contains("CI commit 01"), ) diff --git a/pkg/integration/tests/interactive_rebase/edit_non_todo_commit_during_rebase.go b/pkg/integration/tests/interactive_rebase/edit_non_todo_commit_during_rebase.go index f1665157a60..6a21412de90 100644 --- a/pkg/integration/tests/interactive_rebase/edit_non_todo_commit_during_rebase.go +++ b/pkg/integration/tests/interactive_rebase/edit_non_todo_commit_during_rebase.go @@ -25,7 +25,7 @@ var EditNonTodoCommitDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{ Lines( Contains("--- Pending rebase todos ---"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 02"), + Contains("commit 02"), Contains("commit 01"), ). NavigateToLine(Contains("commit 01")). diff --git a/pkg/integration/tests/interactive_rebase/edit_range_select_down_to_merge_outside_rebase.go b/pkg/integration/tests/interactive_rebase/edit_range_select_down_to_merge_outside_rebase.go index 9182c21c8c8..ffb92a4c50f 100644 --- a/pkg/integration/tests/interactive_rebase/edit_range_select_down_to_merge_outside_rebase.go +++ b/pkg/integration/tests/interactive_rebase/edit_range_select_down_to_merge_outside_rebase.go @@ -31,7 +31,7 @@ var EditRangeSelectDownToMergeOutsideRebase = NewIntegrationTest(NewIntegrationT Contains("edit CI commit 02").IsSelected(), Contains("edit CI commit 01").IsSelected(), Contains("--- Commits ---").IsSelected(), - Contains(" CI ⏣─╮ <-- YOU ARE HERE --- Merge branch 'second-change-branch' into first-change-branch").IsSelected(), + Contains(" CI ⏣─╮ Merge branch 'second-change-branch' into first-change-branch").IsSelected(), Contains(" CI │ ◯ * second-change-branch unrelated change"), Contains(" CI │ ◯ second change"), Contains(" CI ◯ │ first change"), diff --git a/pkg/integration/tests/interactive_rebase/edit_range_select_outside_rebase.go b/pkg/integration/tests/interactive_rebase/edit_range_select_outside_rebase.go index 46402418491..93baafbabc0 100644 --- a/pkg/integration/tests/interactive_rebase/edit_range_select_outside_rebase.go +++ b/pkg/integration/tests/interactive_rebase/edit_range_select_outside_rebase.go @@ -44,7 +44,7 @@ var EditRangeSelectOutsideRebase = NewIntegrationTest(NewIntegrationTestArgs{ Contains("edit CI second change").IsSelected(), Contains("edit CI * original").IsSelected(), Contains("--- Commits ---").IsSelected(), - Contains(" CI ◯ <-- YOU ARE HERE --- three").IsSelected(), + Contains(" CI ◯ three").IsSelected(), Contains(" CI ◯ two"), Contains(" CI ◯ one"), ) diff --git a/pkg/integration/tests/interactive_rebase/interactive_rebase_of_copied_branch.go b/pkg/integration/tests/interactive_rebase/interactive_rebase_of_copied_branch.go index 78e4e9cd982..8f98e999bef 100644 --- a/pkg/integration/tests/interactive_rebase/interactive_rebase_of_copied_branch.go +++ b/pkg/integration/tests/interactive_rebase/interactive_rebase_of_copied_branch.go @@ -37,7 +37,7 @@ var InteractiveRebaseOfCopiedBranch = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("CI commit 03"), Contains("pick").Contains("CI commit 02"), Contains("--- Commits ---"), - Contains("CI <-- YOU ARE HERE --- commit 01"), + Contains("CI commit 01"), ) }, }) diff --git a/pkg/integration/tests/interactive_rebase/mid_rebase_range_select.go b/pkg/integration/tests/interactive_rebase/mid_rebase_range_select.go index c5574748ea8..cb96b830888 100644 --- a/pkg/integration/tests/interactive_rebase/mid_rebase_range_select.go +++ b/pkg/integration/tests/interactive_rebase/mid_rebase_range_select.go @@ -31,7 +31,7 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("commit 07"), Contains("pick").Contains("commit 06"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 05").IsSelected(), + Contains("commit 05").IsSelected(), Contains("commit 04"), ). SelectPreviousItem(). @@ -45,7 +45,7 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("commit 07").IsSelected(), Contains("pick").Contains("commit 06").IsSelected(), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 05"), + Contains("commit 05"), Contains("commit 04"), ). Press(keys.Commits.MarkCommitAsFixup). @@ -57,7 +57,7 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ Contains("fixup").Contains("commit 07").IsSelected(), Contains("fixup").Contains("commit 06").IsSelected(), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 05"), + Contains("commit 05"), Contains("commit 04"), ). Press(keys.Commits.PickCommit). @@ -69,7 +69,7 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("commit 07").IsSelected(), Contains("pick").Contains("commit 06").IsSelected(), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 05"), + Contains("commit 05"), Contains("commit 04"), ). Press(keys.Universal.Edit). @@ -81,7 +81,7 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ Contains("edit").Contains("commit 07").IsSelected(), Contains("edit").Contains("commit 06").IsSelected(), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 05"), + Contains("commit 05"), Contains("commit 04"), ). Press(keys.Commits.SquashDown). @@ -93,7 +93,7 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ Contains("squash").Contains("commit 07").IsSelected(), Contains("squash").Contains("commit 06").IsSelected(), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 05"), + Contains("commit 05"), Contains("commit 04"), ). Press(keys.Commits.MoveDownCommit). @@ -105,7 +105,7 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ Contains("squash").Contains("commit 07").IsSelected(), Contains("squash").Contains("commit 06").IsSelected(), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 05"), + Contains("commit 05"), Contains("commit 04"), ). Tap(func() { @@ -120,7 +120,7 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ Contains("squash").Contains("commit 06").IsSelected(), Contains("pick").Contains("commit 08"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 05"), + Contains("commit 05"), Contains("commit 04"), ). Press(keys.Commits.MoveUpCommit). @@ -132,7 +132,7 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("commit 09"), Contains("pick").Contains("commit 08"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 05"), + Contains("commit 05"), Contains("commit 04"), ). Press(keys.Commits.MoveUpCommit). @@ -144,7 +144,7 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("commit 09"), Contains("pick").Contains("commit 08"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 05"), + Contains("commit 05"), Contains("commit 04"), ). Press(keys.Commits.MoveUpCommit). @@ -159,7 +159,7 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("commit 09"), Contains("pick").Contains("commit 08"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 05"), + Contains("commit 05"), Contains("commit 04"), ). // Verify we can't perform an action on a range that includes both @@ -174,7 +174,7 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("commit 09"), Contains("pick").Contains("commit 08").IsSelected(), Contains("--- Commits ---").IsSelected(), - Contains("<-- YOU ARE HERE --- commit 05").IsSelected(), + Contains("commit 05").IsSelected(), Contains("commit 04"), ). Press(keys.Commits.MarkCommitAsFixup). @@ -189,7 +189,7 @@ var MidRebaseRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("commit 09"), Contains("pick").Contains("commit 08").IsSelected(), Contains("--- Commits ---").IsSelected(), - Contains("<-- YOU ARE HERE --- commit 05").IsSelected(), + Contains("commit 05").IsSelected(), Contains("commit 04"), ). // continue the rebase diff --git a/pkg/integration/tests/interactive_rebase/move_in_rebase.go b/pkg/integration/tests/interactive_rebase/move_in_rebase.go index 56f34e4896c..1cc9dd785f3 100644 --- a/pkg/integration/tests/interactive_rebase/move_in_rebase.go +++ b/pkg/integration/tests/interactive_rebase/move_in_rebase.go @@ -30,7 +30,7 @@ var MoveInRebase = NewIntegrationTest(NewIntegrationTestArgs{ Contains("commit 03"), Contains("commit 02"), Contains("--- Commits ---"), - Contains("YOU ARE HERE").Contains("commit 01").IsSelected(), + Contains("commit 01").IsSelected(), ). SelectPreviousItem(). Press(keys.Commits.MoveUpCommit). @@ -40,7 +40,7 @@ var MoveInRebase = NewIntegrationTest(NewIntegrationTestArgs{ Contains("commit 02").IsSelected(), Contains("commit 03"), Contains("--- Commits ---"), - Contains("YOU ARE HERE").Contains("commit 01"), + Contains("commit 01"), ). Press(keys.Commits.MoveUpCommit). Lines( @@ -49,7 +49,7 @@ var MoveInRebase = NewIntegrationTest(NewIntegrationTestArgs{ Contains("commit 04"), Contains("commit 03"), Contains("--- Commits ---"), - Contains("YOU ARE HERE").Contains("commit 01"), + Contains("commit 01"), ). // assert we can't move past the top Press(keys.Commits.MoveUpCommit). @@ -62,7 +62,7 @@ var MoveInRebase = NewIntegrationTest(NewIntegrationTestArgs{ Contains("commit 04"), Contains("commit 03"), Contains("--- Commits ---"), - Contains("YOU ARE HERE").Contains("commit 01"), + Contains("commit 01"), ). Press(keys.Commits.MoveDownCommit). Lines( @@ -71,7 +71,7 @@ var MoveInRebase = NewIntegrationTest(NewIntegrationTestArgs{ Contains("commit 02").IsSelected(), Contains("commit 03"), Contains("--- Commits ---"), - Contains("YOU ARE HERE").Contains("commit 01"), + Contains("commit 01"), ). Press(keys.Commits.MoveDownCommit). Lines( @@ -80,7 +80,7 @@ var MoveInRebase = NewIntegrationTest(NewIntegrationTestArgs{ Contains("commit 03"), Contains("commit 02").IsSelected(), Contains("--- Commits ---"), - Contains("YOU ARE HERE").Contains("commit 01"), + Contains("commit 01"), ). // assert we can't move past the bottom Press(keys.Commits.MoveDownCommit). @@ -93,7 +93,7 @@ var MoveInRebase = NewIntegrationTest(NewIntegrationTestArgs{ Contains("commit 03"), Contains("commit 02").IsSelected(), Contains("--- Commits ---"), - Contains("YOU ARE HERE").Contains("commit 01"), + Contains("commit 01"), ). // move it back up one so that we land in a different order than we started with Press(keys.Commits.MoveUpCommit). @@ -103,7 +103,7 @@ var MoveInRebase = NewIntegrationTest(NewIntegrationTestArgs{ Contains("commit 02").IsSelected(), Contains("commit 03"), Contains("--- Commits ---"), - Contains("YOU ARE HERE").Contains("commit 01"), + Contains("commit 01"), ). Tap(func() { t.Common().ContinueRebase() @@ -112,7 +112,7 @@ var MoveInRebase = NewIntegrationTest(NewIntegrationTestArgs{ Contains("commit 04"), Contains("commit 02").IsSelected(), Contains("commit 03"), - DoesNotContain("YOU ARE HERE").Contains("commit 01"), + Contains("commit 01"), ) }, }) diff --git a/pkg/integration/tests/interactive_rebase/move_update_ref_todo.go b/pkg/integration/tests/interactive_rebase/move_update_ref_todo.go index b0025ebbfc5..00f4ba11f5d 100644 --- a/pkg/integration/tests/interactive_rebase/move_update_ref_todo.go +++ b/pkg/integration/tests/interactive_rebase/move_update_ref_todo.go @@ -34,7 +34,7 @@ var MoveUpdateRefTodo = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("CI commit 03"), Contains("pick").Contains("CI commit 02"), Contains("--- Commits ---"), - Contains("CI ◯ <-- YOU ARE HERE --- commit 01"), + Contains("CI ◯ commit 01"), ). NavigateToLine(Contains("update-ref")). Press(keys.Commits.MoveUpCommit). @@ -48,7 +48,7 @@ var MoveUpdateRefTodo = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("CI commit 03"), Contains("pick").Contains("CI commit 02"), Contains("--- Commits ---"), - Contains("CI ◯ <-- YOU ARE HERE --- commit 01"), + Contains("CI ◯ commit 01"), ). Tap(func() { t.Common().ContinueRebase() diff --git a/pkg/integration/tests/interactive_rebase/pick_rescheduled.go b/pkg/integration/tests/interactive_rebase/pick_rescheduled.go index c37304b8ed7..af948b7cd13 100644 --- a/pkg/integration/tests/interactive_rebase/pick_rescheduled.go +++ b/pkg/integration/tests/interactive_rebase/pick_rescheduled.go @@ -30,7 +30,7 @@ var PickRescheduled = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("three"), Contains("pick").Contains("two"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- one").IsSelected(), + Contains("one").IsSelected(), ). Tap(func() { t.Shell().CreateFile("file3", "other content\n") @@ -44,7 +44,7 @@ var PickRescheduled = NewIntegrationTest(NewIntegrationTestArgs{ Contains("--- Pending rebase todos ---"), Contains("pick").Contains("three"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- two"), + Contains("two"), Contains("one"), ) }, diff --git a/pkg/integration/tests/interactive_rebase/quick_start.go b/pkg/integration/tests/interactive_rebase/quick_start.go index ad36570f3df..07baa061608 100644 --- a/pkg/integration/tests/interactive_rebase/quick_start.go +++ b/pkg/integration/tests/interactive_rebase/quick_start.go @@ -77,7 +77,7 @@ var QuickStart = NewIntegrationTest(NewIntegrationTestArgs{ Contains("feature-branch two").IsSelected(), Contains("feature-branch one"), Contains("--- Commits ---"), - Contains("last main commit").Contains("YOU ARE HERE"), + Contains("last main commit"), Contains("initial commit"), ). // Try again, verify we fail because we're already rebasing @@ -109,7 +109,7 @@ var QuickStart = NewIntegrationTest(NewIntegrationTestArgs{ Contains("--- Pending rebase todos ---"), Contains("branch-with-merge three").IsSelected(), Contains("--- Commits ---"), - Contains("Merge branch 'branch-to-merge'").Contains("YOU ARE HERE"), + Contains("Merge branch 'branch-to-merge'"), Contains("branch-to-merge two"), Contains("branch-to-merge one"), Contains("branch-with-merge two"), diff --git a/pkg/integration/tests/interactive_rebase/quick_start_keep_selection.go b/pkg/integration/tests/interactive_rebase/quick_start_keep_selection.go index 63f90b87a73..d57be84b509 100644 --- a/pkg/integration/tests/interactive_rebase/quick_start_keep_selection.go +++ b/pkg/integration/tests/interactive_rebase/quick_start_keep_selection.go @@ -48,7 +48,7 @@ var QuickStartKeepSelection = NewIntegrationTest(NewIntegrationTestArgs{ Contains("pick").Contains("CI commit 03"), Contains("CI commit 02").IsSelected(), Contains("--- Commits ---"), - Contains("CI <-- YOU ARE HERE --- commit 01"), + Contains("CI commit 01"), ) }, }) diff --git a/pkg/integration/tests/interactive_rebase/quick_start_keep_selection_range.go b/pkg/integration/tests/interactive_rebase/quick_start_keep_selection_range.go index 31cec80ee4b..6b2fe47173e 100644 --- a/pkg/integration/tests/interactive_rebase/quick_start_keep_selection_range.go +++ b/pkg/integration/tests/interactive_rebase/quick_start_keep_selection_range.go @@ -53,7 +53,7 @@ var QuickStartKeepSelectionRange = NewIntegrationTest(NewIntegrationTestArgs{ Contains("CI commit 03").IsSelected(), Contains("CI commit 02").IsSelected(), Contains("--- Commits ---"), - Contains("CI <-- YOU ARE HERE --- commit 01"), + Contains("CI commit 01"), ) }, }) diff --git a/pkg/integration/tests/interactive_rebase/rebase.go b/pkg/integration/tests/interactive_rebase/rebase.go index 93cf56e9436..e1940ff7a56 100644 --- a/pkg/integration/tests/interactive_rebase/rebase.go +++ b/pkg/integration/tests/interactive_rebase/rebase.go @@ -40,7 +40,7 @@ var Rebase = NewIntegrationTest(NewIntegrationTestArgs{ MatchesRegexp("pick.*second commit to edit"), MatchesRegexp("pick.*commit to squash"), Contains("--- Commits ---"), - MatchesRegexp("YOU ARE HERE.*first commit to edit").IsSelected(), + Contains("first commit to edit").IsSelected(), Contains("initial commit"), ). SelectPreviousItem(). @@ -52,7 +52,7 @@ var Rebase = NewIntegrationTest(NewIntegrationTestArgs{ MatchesRegexp("pick.*second commit to edit"), MatchesRegexp("squash.*commit to squash").IsSelected(), Contains("--- Commits ---"), - MatchesRegexp("YOU ARE HERE.*first commit to edit"), + Contains("first commit to edit"), Contains("initial commit"), ). SelectPreviousItem(). @@ -64,7 +64,7 @@ var Rebase = NewIntegrationTest(NewIntegrationTestArgs{ MatchesRegexp("edit.*second commit to edit").IsSelected(), MatchesRegexp("squash.*commit to squash"), Contains("--- Commits ---"), - MatchesRegexp("YOU ARE HERE.*first commit to edit"), + Contains("first commit to edit"), Contains("initial commit"), ). SelectPreviousItem(). @@ -76,7 +76,7 @@ var Rebase = NewIntegrationTest(NewIntegrationTestArgs{ MatchesRegexp("edit.*second commit to edit"), MatchesRegexp("squash.*commit to squash"), Contains("--- Commits ---"), - MatchesRegexp("YOU ARE HERE.*first commit to edit"), + Contains("first commit to edit"), Contains("initial commit"), ). SelectPreviousItem(). @@ -88,7 +88,7 @@ var Rebase = NewIntegrationTest(NewIntegrationTestArgs{ MatchesRegexp("edit.*second commit to edit"), MatchesRegexp("squash.*commit to squash"), Contains("--- Commits ---"), - MatchesRegexp("YOU ARE HERE.*first commit to edit"), + Contains("first commit to edit"), Contains("initial commit"), ). Tap(func() { @@ -99,7 +99,7 @@ var Rebase = NewIntegrationTest(NewIntegrationTestArgs{ MatchesRegexp("fixup.*commit to fixup").IsSelected(), MatchesRegexp("drop.*commit to drop"), Contains("--- Commits ---"), - MatchesRegexp("YOU ARE HERE.*second commit to edit"), + Contains("second commit to edit"), MatchesRegexp("first commit to edit"), Contains("initial commit"), ). diff --git a/pkg/integration/tests/interactive_rebase/revert_during_rebase_when_stopped_on_edit.go b/pkg/integration/tests/interactive_rebase/revert_during_rebase_when_stopped_on_edit.go index 5ec043d62f2..16a2b8c25a2 100644 --- a/pkg/integration/tests/interactive_rebase/revert_during_rebase_when_stopped_on_edit.go +++ b/pkg/integration/tests/interactive_rebase/revert_during_rebase_when_stopped_on_edit.go @@ -33,7 +33,7 @@ var RevertDuringRebaseWhenStoppedOnEdit = NewIntegrationTest(NewIntegrationTestA Contains("--- Pending rebase todos ---"), Contains("pick").Contains("commit 04"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 03").IsSelected(), + Contains("commit 03").IsSelected(), Contains("commit 02"), Contains("commit 01"), Contains("master commit 2"), @@ -52,7 +52,7 @@ var RevertDuringRebaseWhenStoppedOnEdit = NewIntegrationTest(NewIntegrationTestA Contains("--- Pending rebase todos ---"), Contains("pick").Contains("commit 04"), Contains("--- Commits ---"), - Contains(`<-- YOU ARE HERE --- Revert "commit 01"`), + Contains(`Revert "commit 01"`), Contains(`Revert "commit 02"`), Contains("commit 03"), Contains("commit 02").IsSelected(), diff --git a/pkg/integration/tests/interactive_rebase/revert_multiple_commits_in_interactive_rebase.go b/pkg/integration/tests/interactive_rebase/revert_multiple_commits_in_interactive_rebase.go index 039619d4c0e..529c0a5ec3b 100644 --- a/pkg/integration/tests/interactive_rebase/revert_multiple_commits_in_interactive_rebase.go +++ b/pkg/integration/tests/interactive_rebase/revert_multiple_commits_in_interactive_rebase.go @@ -87,7 +87,7 @@ var RevertMultipleCommitsInInteractiveRebase = NewIntegrationTest(NewIntegration Contains("pick").Contains("CI unrelated change 3"), Contains("pick").Contains("CI unrelated change 2"), Contains("--- Commits ---"), - Contains(`CI ◯ <-- YOU ARE HERE --- Revert "unrelated change 1"`), + Contains(`CI ◯ Revert "unrelated change 1"`), Contains(`CI ◯ Revert "add first line"`), Contains("CI ◯ add second line"), Contains("CI ◯ add first line"), diff --git a/pkg/integration/tests/interactive_rebase/revert_single_commit_in_interactive_rebase.go b/pkg/integration/tests/interactive_rebase/revert_single_commit_in_interactive_rebase.go index 84975c1d95c..7126699dc08 100644 --- a/pkg/integration/tests/interactive_rebase/revert_single_commit_in_interactive_rebase.go +++ b/pkg/integration/tests/interactive_rebase/revert_single_commit_in_interactive_rebase.go @@ -88,7 +88,7 @@ var RevertSingleCommitInInteractiveRebase = NewIntegrationTest(NewIntegrationTes Contains("pick").Contains("CI unrelated change 2"), Contains("pick").Contains("CI unrelated change 1"), Contains("--- Commits ---"), - Contains(`CI ◯ <-- YOU ARE HERE --- Revert "add first line"`), + Contains(`CI ◯ Revert "add first line"`), Contains("CI ◯ add second line"), Contains("CI ◯ add first line"), Contains("CI ◯ add empty file"), diff --git a/pkg/integration/tests/interactive_rebase/reword_commit_with_editor_and_fail.go b/pkg/integration/tests/interactive_rebase/reword_commit_with_editor_and_fail.go index 6633f9378cc..df6486772e7 100644 --- a/pkg/integration/tests/interactive_rebase/reword_commit_with_editor_and_fail.go +++ b/pkg/integration/tests/interactive_rebase/reword_commit_with_editor_and_fail.go @@ -36,7 +36,7 @@ var RewordCommitWithEditorAndFail = NewIntegrationTest(NewIntegrationTestArgs{ Contains("--- Pending rebase todos ---"), Contains("commit 03"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 02").IsSelected(), + Contains("commit 02").IsSelected(), Contains("commit 01"), ) diff --git a/pkg/integration/tests/interactive_rebase/reword_you_are_here_commit.go b/pkg/integration/tests/interactive_rebase/reword_you_are_here_commit.go index ee0ff81c438..92aaf1a43d1 100644 --- a/pkg/integration/tests/interactive_rebase/reword_you_are_here_commit.go +++ b/pkg/integration/tests/interactive_rebase/reword_you_are_here_commit.go @@ -28,7 +28,7 @@ var RewordYouAreHereCommit = NewIntegrationTest(NewIntegrationTestArgs{ Contains("--- Pending rebase todos ---"), Contains("commit 03"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 02").IsSelected(), + Contains("commit 02").IsSelected(), Contains("commit 01"), ). Press(keys.Commits.RenameCommit). @@ -44,7 +44,7 @@ var RewordYouAreHereCommit = NewIntegrationTest(NewIntegrationTestArgs{ Contains("--- Pending rebase todos ---"), Contains("commit 03"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- renamed 02").IsSelected(), + Contains("renamed 02").IsSelected(), Contains("commit 01"), ) }, diff --git a/pkg/integration/tests/interactive_rebase/reword_you_are_here_commit_with_editor.go b/pkg/integration/tests/interactive_rebase/reword_you_are_here_commit_with_editor.go index 3ad86bde87c..b927684fefc 100644 --- a/pkg/integration/tests/interactive_rebase/reword_you_are_here_commit_with_editor.go +++ b/pkg/integration/tests/interactive_rebase/reword_you_are_here_commit_with_editor.go @@ -30,7 +30,7 @@ var RewordYouAreHereCommitWithEditor = NewIntegrationTest(NewIntegrationTestArgs Contains("--- Pending rebase todos ---"), Contains("commit 03"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit 02").IsSelected(), + Contains("commit 02").IsSelected(), Contains("commit 01"), ). Press(keys.Commits.RenameCommitWithEditor). @@ -44,7 +44,7 @@ var RewordYouAreHereCommitWithEditor = NewIntegrationTest(NewIntegrationTestArgs Contains("--- Pending rebase todos ---"), Contains("commit 03"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- renamed 02").IsSelected(), + Contains("renamed 02").IsSelected(), Contains("commit 01"), ) }, diff --git a/pkg/integration/tests/interactive_rebase/show_exec_todos.go b/pkg/integration/tests/interactive_rebase/show_exec_todos.go index 55a9bead0e2..1ae51584523 100644 --- a/pkg/integration/tests/interactive_rebase/show_exec_todos.go +++ b/pkg/integration/tests/interactive_rebase/show_exec_todos.go @@ -35,7 +35,7 @@ var ShowExecTodos = NewIntegrationTest(NewIntegrationTestArgs{ Contains("exec").Contains("false"), Contains("pick").Contains("CI commit 03"), Contains("--- Commits ---"), - Contains("CI ◯ <-- YOU ARE HERE --- commit 02"), + Contains("CI ◯ commit 02"), Contains("CI ◯ commit 01"), ). Tap(func() { @@ -45,7 +45,7 @@ var ShowExecTodos = NewIntegrationTest(NewIntegrationTestArgs{ Lines( Contains("--- Pending rebase todos ---"), Contains("--- Commits ---"), - Contains("CI ◯ <-- YOU ARE HERE --- commit 03"), + Contains("CI ◯ commit 03"), Contains("CI ◯ commit 02"), Contains("CI ◯ commit 01"), ). diff --git a/pkg/integration/tests/interactive_rebase/swap_in_rebase_with_conflict.go b/pkg/integration/tests/interactive_rebase/swap_in_rebase_with_conflict.go index 9eb045909c1..f6653f9b008 100644 --- a/pkg/integration/tests/interactive_rebase/swap_in_rebase_with_conflict.go +++ b/pkg/integration/tests/interactive_rebase/swap_in_rebase_with_conflict.go @@ -33,7 +33,7 @@ var SwapInRebaseWithConflict = NewIntegrationTest(NewIntegrationTestArgs{ Contains("commit three"), Contains("commit two"), Contains("--- Commits ---"), - Contains("YOU ARE HERE").Contains("commit one").IsSelected(), + Contains("commit one").IsSelected(), ). SelectPreviousItem(). Press(keys.Commits.MoveUpCommit). @@ -42,7 +42,7 @@ var SwapInRebaseWithConflict = NewIntegrationTest(NewIntegrationTestArgs{ Contains("commit two").IsSelected(), Contains("commit three"), Contains("--- Commits ---"), - Contains("YOU ARE HERE").Contains("commit one"), + Contains("commit one"), ). Tap(func() { t.Common().ContinueRebase() diff --git a/pkg/integration/tests/interactive_rebase/swap_in_rebase_with_conflict_and_edit.go b/pkg/integration/tests/interactive_rebase/swap_in_rebase_with_conflict_and_edit.go index 23f796fd996..f5beb437435 100644 --- a/pkg/integration/tests/interactive_rebase/swap_in_rebase_with_conflict_and_edit.go +++ b/pkg/integration/tests/interactive_rebase/swap_in_rebase_with_conflict_and_edit.go @@ -33,7 +33,7 @@ var SwapInRebaseWithConflictAndEdit = NewIntegrationTest(NewIntegrationTestArgs{ Contains("commit three"), Contains("commit two"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit one").IsSelected(), + Contains("commit one").IsSelected(), ). NavigateToLine(Contains("commit two")). Press(keys.Commits.MoveUpCommit). @@ -42,7 +42,7 @@ var SwapInRebaseWithConflictAndEdit = NewIntegrationTest(NewIntegrationTestArgs{ Contains("commit two").IsSelected(), Contains("commit three"), Contains("--- Commits ---"), - Contains("<-- YOU ARE HERE --- commit one"), + Contains("commit one"), ). NavigateToLine(Contains("commit three")). Press(keys.Universal.Edit). diff --git a/pkg/integration/tests/interactive_rebase/view_files_of_todo_entries.go b/pkg/integration/tests/interactive_rebase/view_files_of_todo_entries.go index a500ba210ba..29d79513e92 100644 --- a/pkg/integration/tests/interactive_rebase/view_files_of_todo_entries.go +++ b/pkg/integration/tests/interactive_rebase/view_files_of_todo_entries.go @@ -33,7 +33,7 @@ var ViewFilesOfTodoEntries = NewIntegrationTest(NewIntegrationTestArgs{ Contains("update-ref").Contains("branch1"), Contains("pick").Contains("CI commit 02"), Contains("--- Commits ---"), - Contains("CI <-- YOU ARE HERE --- commit 01"), + Contains("CI commit 01"), ). Press(keys.Universal.GoInto)