From: Phillip Wood <phillip.wood123@gmail.com>
To: Stefan Haller <lists@haller-berlin.de>, git@vger.kernel.org
Subject: Re: Interactive rebase: using "pick" for merge commits
Date: Fri, 9 Feb 2024 16:24:10 +0000 [thread overview]
Message-ID: <ad561600-faf6-4d3c-80b2-34b3d1a1b99e@gmail.com> (raw)
In-Reply-To: <424f2e08-a2ad-4bb2-8a6b-136c426dc127@haller-berlin.de>
Hi Stefan
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.
> hint: Could not execute the todo command
> hint:
> hint: pick fa1afe1 some subject
> hint:
> hint: It has been rescheduled; [rest of message snipped]
>
> This error message makes it sound like I could somehow add "-m1" after
> the "pick" to make it work (which is actually what I would like to be
> able to do). I had to go read the source code to find out that that's
> not the case, and the error message only comes from the fact that the
> code is shared with the cherry-pick and revert commands, which do have
> the -m option.
Oh, that's unfortunate - we should really reject the todo list when we
parse it at the start of the rebase if it is going to try and "pick" a
merge.
> 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.
Best Wishes
Phillip
next prev parent reply other threads:[~2024-02-09 16:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-09 15:52 Interactive rebase: using "pick" for merge commits Stefan Haller
2024-02-09 16:24 ` Phillip Wood [this message]
2024-02-10 9:23 ` Stefan Haller
2024-02-12 7:15 ` Patrick Steinhardt
2024-02-12 14:38 ` Phillip Wood
2024-02-23 20:59 ` Stefan Haller
2024-02-26 10:56 ` Phillip Wood
2024-02-26 19:07 ` Stefan Haller
2024-02-27 10:41 ` phillip.wood123
2024-02-12 16:39 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ad561600-faf6-4d3c-80b2-34b3d1a1b99e@gmail.com \
--to=phillip.wood123@gmail.com \
--cc=git@vger.kernel.org \
--cc=lists@haller-berlin.de \
--cc=phillip.wood@dunelm.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).