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

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

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Feb 12, 2024, 14:38 UTC
Message-ID
<040f142c-7ee2-429e-88eb-d328b01a4b8c@gmail.com>
In-Reply-To
<ZcnFl8kypKRYeLo3@tanuki>
Hi Patrick and Stefan
On 12/02/2024 07:15, Patrick Steinhardt wrote:
Show 14 quoted lines
> On Sat, Feb 10, 2024 at 10:23:16AM +0100, Stefan Haller wrote:
>> On 09.02.24 17:24, Phillip Wood wrote:
>> 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".

It would certainly be possible to extend the sequencer to do that but I'm not familiar with why people use "git cherry-pick -m" [1] so I'm wondering what this would be used for. It would involve a bit of extra complexity so I think we'd want a compelling reason as to why cherry-picking merges without maintaining the topology is useful especially as one can currently do that via "exec git cherry-pick -m ..."

Best Wishes
Phillip

[1] I did a quick web search and the results all seemed to focus on how to do it rather than why you'd want to.

Previous: Patrick SteinhardtNext: Stefan Haller
Message 5 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.