From: Paolo Bonzini <bonzini@gnu.org>
To: Geoffrey Irving <irving@naml.us>
Cc: Alex Riesen <raa.lkml@gmail.com>,
git@vger.kernel.org, Dylan Simon <dylan@dylex.net>
Subject: Re: one half of a rebase
Date: Sat, 12 Sep 2009 16:38:11 +0200 [thread overview]
Message-ID: <4AABB253.2080200@gnu.org> (raw)
In-Reply-To: <7f9d599f0909111923v76e0f411n16555e7cdc0c3ed1@mail.gmail.com>
On 09/12/2009 04:23 AM, Geoffrey Irving wrote:
> On Fri, Sep 11, 2009 at 5:10 PM, Alex Riesen<raa.lkml@gmail.com> wrote:
>> On Fri, Sep 11, 2009 at 19:25, Geoffrey Irving<irving@naml.us> wrote:
>>> If I could do (2) as a separate operation, it would look something like
>>>
>>> git cherry-pick-all topic
>>>
>>> which is simpler and faster since it avoids switching files back and
>>> forth (master to topic and back). Is there a robust way to achieve
>>> the cherry-pick-all semantics with current commands? If not, how
>>> difficult would it be to partition rebase accordingly?
As mentioned by Alex "git am -3" is basically parsing + the second part
of rebase. So, based on Alex's recipe, here is a possible alias for
cherry-pick-all:
[alias]
cherry-pick-all = "!f() { git format-patch -k --stdout --full-index
`git symbolic-ref HEAD`..$1 | git am -k -3 --binary; }; f"
More useful (just because it is more generic) than "the second part of
git rebase", a "sequencer" would be "the second part of git rebase -i",
applying a custom script coming from stdin. If that was present, git
cherry-pick-all could be done like this:
git log --pretty=tformat:'pick %h' master..topic | git sequencer
And here is yet another alternative, that however would only work only
if the patches applies perfectly:
git log --pretty=format:%h master..topic | xargs -rn1 git cherry-pick
Paolo
prev parent reply other threads:[~2009-09-12 14:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-11 17:25 one half of a rebase Geoffrey Irving
2009-09-11 18:39 ` Matthieu Moy
2009-09-11 21:10 ` Alex Riesen
2009-09-12 2:23 ` Geoffrey Irving
2009-09-12 14:38 ` Paolo Bonzini [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=4AABB253.2080200@gnu.org \
--to=bonzini@gnu.org \
--cc=dylan@dylex.net \
--cc=git@vger.kernel.org \
--cc=irving@naml.us \
--cc=raa.lkml@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.