From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Björn Steinbrink" <B.Steinbrink@gmx.de>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH RFC] rebase: add --revisions flag
Date: Tue, 8 Dec 2009 18:49:04 +0200 [thread overview]
Message-ID: <20091208164904.GB32204@redhat.com> (raw)
In-Reply-To: <20091208164113.GB2005@atjola.homenet>
On Tue, Dec 08, 2009 at 05:41:13PM +0100, Björn Steinbrink wrote:
> On 2009.12.08 18:11:44 +0200, Michael S. Tsirkin wrote:
> > On Tue, Dec 08, 2009 at 05:08:22PM +0100, Björn Steinbrink wrote:
> > > On 2009.12.08 16:47:42 +0200, Michael S. Tsirkin wrote:
> > > > Add --revisions flag to rebase, so that it can be used
> > > > to apply an arbitrary range of commits on top
> > > > of a current branch.
> > > >
> > > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > > > ---
> > > >
> > > > I've been wishing for this functionality for a while now,
> > > > so here goes. This isn't yet properly documented and I didn't
> > > > write a test, but the patch seems to work fine for me.
> > > > Any early flames/feedback?
> > >
> > > This pretty much reverses what rebase normally does. Instead of "rebase
> > > this onto that" it's "'rebase' that onto this". And instead of updating
> > > the branch head that got rebased, the, uhm, "upstream" gets updated.
> > >
> > > Also, AFAICT this needs to be called like this:
> > > git rebase --revisions foo..bar HEAD
> > >
> > > Changing the meaning of the <upstream> argument and relying on the fact
> > > that <newbase> defaults to <upstream>. If such a thing gets added, it
> > > should rather work like --root, not using <upstream> at all, but --onto
> > > <newbase> only. Maybe defaulting to HEAD for <newbase> and making --onto
> > > optional, as it's reversed WRT what it does compared to the usual
> > > rebase.
> >
> > Sorry, I had trouble parsing the above. Could you suggest e.g. how the
> > help line should look?
>
> Current:
> git rebase [-i | --interactive] [options] [--onto <newbase>]
> <upstream> [<branch>]
> git rebase [-i | --interactive] [options] --onto <newbase>
> --root [<branch>]
>
> Add:
> git rebase [-i | --interactive] [options] --revisions <range> [<branch>]
>
> (Thinking about it, I guess an explicit --onto makes no sense with the
> --revisions flag)
I agree.
So this is different from what I implemented basically only in that
we should disallow combining --onto with --revisions. Right?
> > > But generally, I'd say it would be better to add such a range feature to
> > > cherry-pick than abusing rebase for that.
> >
> > The reason to use rebase is that I often want to combine
> > this with -i flag, editing patches as they are applied.
>
> Hm, well, your patch didn't touch git-rebase--interactive.sh ;-)
>
> Björn
Ah, I was wondering why it doesn't work :)
next prev parent reply other threads:[~2009-12-08 16:51 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-08 14:47 [PATCH RFC] rebase: add --revisions flag Michael S. Tsirkin
2009-12-08 16:08 ` Björn Steinbrink
2009-12-08 16:11 ` Michael S. Tsirkin
2009-12-08 16:41 ` Björn Steinbrink
2009-12-08 16:49 ` Michael S. Tsirkin [this message]
2009-12-08 19:13 ` Björn Steinbrink
2009-12-08 16:14 ` Michael S. Tsirkin
2009-12-08 16:37 ` Björn Steinbrink
2009-12-08 16:44 ` Michael S. Tsirkin
2009-12-08 19:11 ` Björn Steinbrink
2009-12-08 20:00 ` Michael S. Tsirkin
2009-12-09 13:19 ` Björn Steinbrink
2009-12-09 14:02 ` Michael S. Tsirkin
2009-12-09 4:51 ` Miles Bader
2009-12-08 20:22 ` Junio C Hamano
2009-12-08 20:29 ` Sverre Rabbelier
2009-12-09 5:30 ` Christian Couder
2009-12-09 6:52 ` Christian Couder
2009-12-09 9:08 ` Sverre Rabbelier
2009-12-09 8:47 ` Peter Krefting
2009-12-09 9:37 ` Michael S. Tsirkin
2009-12-09 10:52 ` Peter Krefting
2009-12-09 11:22 ` Björn Steinbrink
2009-12-09 11:48 ` Andreas Schwab
2009-12-09 12:06 ` Björn Steinbrink
2009-12-09 12:07 ` Michael S. Tsirkin
2009-12-09 13:06 ` Björn Steinbrink
2009-12-09 19:46 ` Junio C Hamano
2009-12-10 7:43 ` Björn Steinbrink
2009-12-10 17:20 ` Junio C Hamano
2009-12-11 11:07 ` Björn Steinbrink
2009-12-09 13:20 ` Peter Krefting
2009-12-09 13:41 ` Björn Steinbrink
2009-12-10 8:43 ` Peter Krefting
2009-12-10 11:08 ` Björn Steinbrink
2009-12-09 10:38 ` Michael S. Tsirkin
2009-12-09 10:55 ` Matthieu Moy
2009-12-09 13:30 ` Matthieu Moy
2009-12-09 13:45 ` Michael S. Tsirkin
2009-12-09 14:01 ` Björn Steinbrink
2009-12-09 14:12 ` Michael S. Tsirkin
2009-12-09 20:10 ` Junio C Hamano
2009-12-13 22:47 ` David Kågedal
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=20091208164904.GB32204@redhat.com \
--to=mst@redhat.com \
--cc=B.Steinbrink@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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