On Sat, Feb 10, 2024 at 10:23:16AM +0100, Stefan Haller wrote: > On 09.02.24 17:24, Phillip Wood wrote: > > On 09/02/2024 15:52, Stefan Haller wrote: > >> When I do an interactive rebase, and manually enter a "pick" with the > >> commit hash of a merge commit, I get the following confusing error > >> message: > >> > >> error: commit fa1afe1 is a merge but no -m option was given. > >> > >> Is it crazy to want pick to work like this? Should it be supported? > > > > It causes problems trying to maintain the topology. In the past there > > was a "--preserve-merges" option that allowed one to "pick" merges but > > it broke if the user edited the todo list. The "--rebase-merges" option > > was introduced with the "label", "reset" and "merge" todo list > > instructions to allow the user to control the topology. > > Yes, I'm familiar with all this, but that's not what I mean. I don't > want to maintain the topology here, and I'm also not suggesting that git > itself generates such "pick" entries with -mX arguments (maybe I wasn't > clear on that). What I want to do is to add such entries myself, as a > user, resulting in the equivalent of doing a "break" at that point in > the rebase and doing a "git cherry-pick -mX <hash-of-merge-commit>" > manually. It would be neat indeed if this could be specified in the instruction sheet. We already support options for the "merge" instruction, so extending "pick" to support options isn't that far-fetched. Then it would become possible to say "pick -m1 fa1afe1". Patrick
Attachment:
signature.asc
Description: PGP signature