mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 12:55:47 +02:00
BeginInteractiveRebaseForCommit is used for all the patch commands, and for rewording. It works by setting the commit we want to stop at to 'edit'; this doesn't work for merge commits. This wasn't a problem for the patch commands so far, because you typically don't use custom patches with merge commits (although we don't prevent this; maybe we should?). However, it was a problem when you tried to reword a merge commit; this previously failed with an error, as the test added in the previous commit demonstrated. Also, we want to add a new patch command that has to stop *before* the selected commit (pull patch to new commit before the original one), and this wouldn't work for the first commit in a feature branch, because it would have to set the last commit before that to 'edit', which isn't possible if that's a merge (which is likely). To fix all this, use a 'break' before the selected commit if the commit is a merge. It is important that we only do it in that case and not always, otherwise we would break the new regression tests that were added a few commits ago. |
||
---|---|---|
.. | ||
advanced_interactive_rebase.go | ||
amend_commit_with_conflict.go | ||
amend_first_commit.go | ||
amend_fixup_commit.go | ||
amend_head_commit_during_rebase.go | ||
amend_merge.go | ||
amend_non_head_commit_during_rebase.go | ||
delete_update_ref_todo.go | ||
dont_show_branch_heads_for_todo_items.go | ||
drop_commit_in_copied_branch_with_update_ref.go | ||
drop_merge_commit.go | ||
drop_todo_commit_with_update_ref.go | ||
drop_with_custom_comment_char.go | ||
edit_and_auto_amend.go | ||
edit_first_commit.go | ||
edit_last_commit_of_stacked_branch.go | ||
edit_non_todo_commit_during_rebase.go | ||
edit_range_select_down_to_merge_outside_rebase.go | ||
edit_range_select_outside_rebase.go | ||
edit_the_confl_commit.go | ||
fixup_first_commit.go | ||
fixup_second_commit.go | ||
interactive_rebase_of_copied_branch.go | ||
interactive_rebase_with_conflict_for_edit_command.go | ||
mid_rebase_range_select.go | ||
move.go | ||
move_across_branch_boundary_outside_rebase.go | ||
move_in_rebase.go | ||
move_update_ref_todo.go | ||
move_with_custom_comment_char.go | ||
outside_rebase_range_select.go | ||
pick_rescheduled.go | ||
quick_start.go | ||
quick_start_keep_selection.go | ||
quick_start_keep_selection_range.go | ||
rebase.go | ||
rebase_with_commit_that_becomes_empty.go | ||
revert_during_rebase_when_stopped_on_edit.go | ||
revert_multiple_commits_in_interactive_rebase.go | ||
revert_single_commit_in_interactive_rebase.go | ||
reword_commit_with_editor_and_fail.go | ||
reword_first_commit.go | ||
reword_last_commit.go | ||
reword_last_commit_of_stacked_branch.go | ||
reword_merge_commit.go | ||
reword_you_are_here_commit.go | ||
reword_you_are_here_commit_with_editor.go | ||
shared.go | ||
show_exec_todos.go | ||
squash_down_first_commit.go | ||
squash_down_second_commit.go | ||
squash_fixups_above.go | ||
squash_fixups_above_first_commit.go | ||
squash_fixups_in_current_branch.go | ||
swap_in_rebase_with_conflict.go | ||
swap_in_rebase_with_conflict_and_edit.go | ||
swap_with_conflict.go | ||
view_files_of_todo_entries.go |