1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-27 00:51:18 +02:00
Files
lazygit/pkg/commands/git_commands
Stefan Haller 17bb3970c1 Filter out merge commits when generating todo changes in InteractiveRebase
We will need this because under some conditions we are going to use this
function to edit a range of commits, and we can't set merge commits to "edit".
This corresponds to the code in startInteractiveRebaseWithEdit which has similar
logic.

It is a bit unfortunate that we will have these two different ways of setting
todos to edit: startInteractiveRebaseWithEdit does it after stopping in the
rebase, in the Then function of its refresh, but InteractiveRebase does it in
the daemon with a ChangeTodoActionsInstruction. It still makes sense though,
given how InteractiveRebase works.

This not only affects "edit", but also "drop", "fixup", and "squash".
Previously, when trying to use these for a range selection that includes a merge
commit, they would fail with the cryptic error message "Some todos not found in
git-rebase-todo"; now they simply exclude the merge commit. I'm not sure if one
is better or worse than the other, and we should probably simply disable the
commands when a merge commit is selected, but that's out of scope in this PR.
2024-12-01 11:05:45 +01:00
..
2024-04-12 08:33:47 +02:00
2024-04-12 08:33:47 +02:00
2023-10-08 18:45:36 +02:00
2024-03-07 20:16:28 +01:00
2023-10-08 18:45:36 +02:00
2024-01-10 09:18:38 +01:00