lazygit/pkg/integration/tests
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
..
bisect Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00
branch pkg/gui: Allow user to select remote and branch when creating a PR 2024-11-23 11:52:21 +11:00
cherry_pick Allow pasting commits more than once 2024-10-13 16:55:54 +02:00
commit Fix copying commit author to clipboard 2024-09-23 09:47:14 +02:00
config Fix loading customCommands from per-repo config file 2024-08-24 11:01:25 +02:00
conflicts Fix ForEachLineInFile to not lose the last line if it doesn't end with a LF 2024-10-09 15:37:08 +02:00
custom_commands Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00
demo [DATALAD RUNCMD] Do interactive fixing of some ambigous typos 2024-08-27 18:03:00 +02:00
diff Add a simple integration test for non-sticky range diff 2024-08-28 19:51:15 +02:00
file Ask to auto-stage unstaged files when continuing a rebase after resolving conflicts 2024-09-02 18:24:36 +02:00
filter_and_search [DATALAD RUNCMD] run codespell throughout fixing typos automagically 2024-08-27 18:03:00 +02:00
filter_by_author Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00
filter_by_path Keep the same commit selected when exiting filtering mode 2024-03-28 12:23:46 +01:00
interactive_rebase Improve editing a commit 2024-11-29 18:29:47 +01:00
misc [DATALAD RUNCMD] run codespell throughout fixing typos automagically 2024-08-27 18:03:00 +02:00
patch_building Fix custom patch operations on added files 2024-06-23 12:40:31 +02:00
reflog Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00
shared Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
shell_commands Rename "Custom Command" to "Shell Command" 2024-08-17 10:56:03 +02:00
staging add test case for decreasing Diff Context length to zero 2024-11-19 08:21:19 +11:00
stash Switch to Files panel after popping a stash 2024-09-06 13:15:37 +02:00
status Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00
submodule Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00
sync Remove ColoredBranchStatus and branchStatusColor 2024-06-03 13:02:46 +02:00
tag Make it possible to handle toasts in integration tests 2024-01-14 17:42:03 +01:00
ui Add config option to disable tab switching with jump keys 2024-11-09 17:19:14 +11:00
undo Support range select in rebase actions 2024-01-23 17:23:56 +11:00
worktree Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00
test_list.go Add test for editing several commits right after a merge commit 2024-11-29 18:24:00 +01:00
test_list_generator.go Make test_list_generator.go print what it's doing 2023-09-29 20:40:15 +02:00
tests.go Set working directory in lazygit test command 2024-01-12 19:59:31 +11:00