From: Jeff King <peff@peff.net>
To: Phillip Wood <phillip.wood123@gmail.com>
Cc: Trevor Gross <tg@trevorgross.com>,
git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Stefan Haller <lists@haller-berlin.de>,
Derrick Stolee <stolee@gmail.com>,
Phillip Wood <phillip.wood@dunelm.org.uk>
Subject: Re: [PATCH] rebase -i: introduce `pick -x` to add "cherry picked from commit ..."
Date: Tue, 7 Jul 2026 00:27:12 -0400 [thread overview]
Message-ID: <20260707042712.GA677056@coredump.intra.peff.net> (raw)
In-Reply-To: <5d238e0d-18ba-429a-a9a4-a3988b00e1e1@gmail.com>
On Mon, Jul 06, 2026 at 11:08:18AM +0100, Phillip Wood wrote:
> > To be clear, I don't know the answer. It's been ages since I've looked
> > at sequencer code, so there might be more gotchas. That's just my gut
> > feeling from a high level after reading your message.
>
> I don't think it would be much work. The code that edits the todo list is
> rebase specific because it deals with rebase.missingCommitsCheck but it
> shouldn't be too difficult to generalize it. I do wonder though if it makes
> sense to support all of the usual commands when cherry-picking especially
> with `-x`. In particular I'm not sure about adding support for `edit -x`, or
> for `pick -x` followed by `fixup` - what does the trailer mean when the
> commit has been edited or fixed up? (though if you're back-porting bug fixes
> I guess some degree of editing is inevitable)
I'd probably err on the side of assuming the user knows what they're
doing, and will mention any edits in the commit message as appropriate.
Maybe that's being too optimistic. :)
> On a slight tangent I've sometimes wanted to be able to do
>
> git cherry-pick --exec 'make test' some commits
Yeah, though in that case I'd usually cherry-pick and then just do an
in-place "rebase -x 'make test'". You could really do _almost_ any
cherry-pick sequencer operation like that, which is perhaps why we
haven't see a huge number of requests for it.
This "-x" thing is special because it's inherently about looking at the
original commit id, as opposed to fiddling with our rebased version. But
I guess you could "cherry-pick -x" and then rebase (doing whatever
rearranging and markup you wanted) the result.
-Peff
prev parent reply other threads:[~2026-07-07 4:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-05 14:09 [PATCH] rebase -i: introduce `pick -x` to add "cherry picked from commit ..." Trevor Gross
2026-07-05 18:58 ` Junio C Hamano
2026-07-05 22:23 ` Matt Hunter
2026-07-05 20:52 ` Junio C Hamano
2026-07-06 0:24 ` Jeff King
2026-07-06 10:08 ` Phillip Wood
2026-07-06 20:24 ` Junio C Hamano
2026-07-07 4:27 ` Jeff King [this message]
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=20260707042712.GA677056@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=lists@haller-berlin.de \
--cc=phillip.wood123@gmail.com \
--cc=phillip.wood@dunelm.org.uk \
--cc=stolee@gmail.com \
--cc=tg@trevorgross.com \
/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