lazygit/pkg/integration/tests/interactive_rebase
Stefan Haller 649a8b7276 Improve editing a commit
In 67b8ef449c we changed the "edit" command to insert a "break" after the
selected commit, rather than setting the selected todo to "edit". The reason for
doing this was that it now works for merge commits too.

Back then, I claimed "In most cases the behavior is exactly the same as before."
Unfortunately that's not true, there are two reasons why the previous behavior
was better (both are demonstrated by tests earlier in this branch):
- when editing the last commit of a branch in the middle of a stack of branches,
  we are now missing the update-ref todo after it, which means that amending the
  commit breaks the stack
- it breaks auto-amending (see the added test earlier in this branch for an
  explanation)

For these reasons, we are going back to the previous approach of setting the
selected commit to "edit" whenever possible, i.e. unless it's a merge commit.

The only scenario where this could still be a problem is when you have a stack
of branches, and the last commit of one of the branches in the stack is a merge
commit, and you try to edit that. In my experience with stacked branches this is
very unlikely, in almost all cases my stacked branches are linear.
2024-11-29 18:29:47 +01:00
..
advanced_interactive_rebase.go Remove target branch from title of rebase menu 2024-06-03 14:06:11 +02:00
amend_commit_with_conflict.go Insert fake todo entry for a conflicting commit that is being applied 2023-06-22 18:57:58 +02:00
amend_first_commit.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
amend_fixup_commit.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
amend_head_commit_during_rebase.go Improve prompts when amending commits 2023-09-01 18:55:16 +02:00
amend_merge.go Improve prompts when amending commits 2023-09-01 18:55:16 +02:00
amend_non_head_commit_during_rebase.go Use ErrorToast instead of error panel when invoking a disabled command 2024-01-14 17:45:35 +01:00
delete_update_ref_todo.go Fix deleting update-ref todos 2024-03-26 22:29:56 +01:00
dont_show_branch_heads_for_todo_items.go Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00
drop_commit_in_copied_branch_with_update_ref.go Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00
drop_todo_commit_with_update_ref.go Cleanup: remove a no-op Focus() call 2024-11-29 17:33:46 +01:00
drop_with_custom_comment_char.go Support range select in rebase actions 2024-01-23 17:23:56 +11:00
edit_and_auto_amend.go Improve editing a commit 2024-11-29 18:29:47 +01:00
edit_first_commit.go Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
edit_last_commit_of_stacked_branch.go Improve editing a commit 2024-11-29 18:29:47 +01:00
edit_non_todo_commit_during_rebase.go Support range select in rebase actions 2024-01-23 17:23:56 +11:00
edit_range_select_down_to_merge_outside_rebase.go Add test for editing several commits right after a merge commit 2024-11-29 18:24:00 +01:00
edit_range_select_outside_rebase.go Support setting a range of commits to "edit" outside of a rebase 2024-03-09 07:43:48 +01:00
edit_the_confl_commit.go Support range select in rebase actions 2024-01-23 17:23:56 +11:00
fixup_first_commit.go Use ErrorToast instead of error panel when invoking a disabled command 2024-01-14 17:45:35 +01:00
fixup_second_commit.go Support range select in rebase actions 2024-01-23 17:23:56 +11:00
interactive_rebase_of_copied_branch.go Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00
mid_rebase_range_select.go Support setting a range of commits to "edit" outside of a rebase 2024-03-09 07:43:48 +01:00
move.go Support range select in rebase actions 2024-01-23 17:23:56 +11:00
move_in_rebase.go Support range select in rebase actions 2024-01-23 17:23:56 +11:00
move_update_ref_todo.go Allow moving update-ref todos up/down 2024-03-16 22:01:03 +01:00
move_with_custom_comment_char.go Use comment char config on interactive rebase 2023-07-02 02:07:32 -03:00
outside_rebase_range_select.go Support range select in rebase actions 2024-01-23 17:23:56 +11:00
pick_rescheduled.go Add test for a pick that fails and gets rescheduled 2023-06-22 18:57:43 +02:00
quick_start.go Allow showing Disabled errors as error panel instead of toast 2024-01-14 17:45:35 +01:00
quick_start_keep_selection.go Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00
quick_start_keep_selection_range.go Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00
rebase.go Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
reword_commit_with_editor_and_fail.go Add test for rewording a commit and failing with an error 2023-06-22 18:57:43 +02:00
reword_first_commit.go Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
reword_last_commit.go Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
reword_you_are_here_commit.go Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
reword_you_are_here_commit_with_editor.go Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
shared.go Insert fake todo entry for a conflicting commit that is being applied 2023-06-22 18:57:58 +02:00
show_exec_todos.go Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00
squash_down_first_commit.go Use ErrorToast instead of error panel when invoking a disabled command 2024-01-14 17:45:35 +01:00
squash_down_second_commit.go Support range select in rebase actions 2024-01-23 17:23:56 +11:00
squash_fixups_above.go Make it easy to create "amend!" commits 2024-03-22 08:27:45 +01:00
squash_fixups_above_first_commit.go Make it easy to create "amend!" commits 2024-03-22 08:27:45 +01:00
squash_fixups_in_current_branch.go Keep the same line selected after squashing fixup commits 2024-03-09 07:55:22 +01:00
swap_in_rebase_with_conflict.go Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
swap_in_rebase_with_conflict_and_edit.go Add a test for stopping at an "edit" command that conflicts 2023-06-22 18:57:58 +02:00
swap_with_conflict.go Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
view_files_of_todo_entries.go Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00