git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Interactive rebase: using "pick" for merge commits

From
SHStefan Haller <lists@haller-berlin.de>
Date
Feb 10, 2024, 09:23 UTC
Message-ID
<65c65f6b-5ec8-4fa0-a17c-0f2c0d32b390@haller-berlin.de>
In-Reply-To
<ad561600-faf6-4d3c-80b2-34b3d1a1b99e@gmail.com>
On 09.02.24 17:24, Phillip Wood wrote:
Show 14 quoted lines
> 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.

-Stefan
Previous: Phillip WoodNext: Patrick Steinhardt
Message 3 of 10 in “Interactive rebase: using "pick" for merge commits”
  1. Stefan HallerFeb 9, 2024
  2. Phillip WoodFeb 9, 2024
  3. Stefan HallerFeb 10, 2024
  4. Patrick SteinhardtFeb 12, 2024
  5. Phillip WoodFeb 12, 2024
  6. Stefan HallerFeb 23, 2024
  7. Phillip WoodFeb 26, 2024
  8. Stefan HallerFeb 26, 2024
  9. phillip.wood123@gmail.comFeb 27, 2024
  10. Junio C HamanoFeb 12, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.