From: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
To: Francis Moreau <francis.moro@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
Michael J Gruber <git@drmicha.warpmail.net>,
git@vger.kernel.org
Subject: Re: git-rebase skips automatically no more needed commits
Date: Thu, 8 Sep 2011 09:14:20 -0400 (EDT) [thread overview]
Message-ID: <alpine.DEB.2.00.1109080753460.12564@debian> (raw)
In-Reply-To: <CAC9WiBjMUg3SUOP9AJw6qCKrGVLs6Qy_O2fQa_SHX30NkjAEdw@mail.gmail.com>
On Thu, 8 Sep 2011, Francis Moreau wrote:
> On Wed, Sep 7, 2011 at 6:29 PM, Junio C Hamano <gitster@pobox.com> wrote:
> > Francis Moreau <francis.moro@gmail.com> writes:
> >
> >> If I start the rebase process with : "git rebase -i -p master foo"
> >> then the filtering is happening. Here 'foo' has been created with
> >> v2.6.39 tag as start point and contains some patches cherry-picked
> >> from the upstream.
> >>
> >> However if I call git-rebase this way: "git rebase -i -p --onto master
> >> v2.6.39 foo", then it seems that no filtering is done.
Patches that are in both sides of v2.6.39...foo will be filtered, but
as Junio said, what is in master is not considered. In your case,
since foo was created from the tag, there should of course be no
commits in foo..v2.6.39.
> I'm using "git rebase --onto A B C" because I want to simplify git's
> work.
What work? Calculating mege-base and patch-ids? But that's exactly
what you said you don't want to avoid, no?
> I know that any commits between A..B are already in A history
Did you mean "B..A" here?
> and I'm not interested in rebasing them anyways.
They wouldn't be rebased by running "git rebase A C" either... Maybe
I'm misunderstanding something.
> Hmm I dont understand why "rebase --onto A B C" wouldn't try to find
> the merge base between A and B. If it doesn't (which is quite uncommon
> I guess) then don't do the filtering as we're currently doing but if
> there's a merge base (common case) then do the filtering.
It could do that. I think that's what Junio meant by "justifiable--- I
dunno". In your case, though, it seems like "git rebase master foo"
would do exactly what you want.
Somewhat related, I think "git rebase --onto A B C" should NOT filter
out patches that also appear both sides of "B...C", because when
"--onto" is used, "B" is only used as a way to calculate the
merge-base. I think it would make more sense to filter out from
appears in both "B..C" what also appears in "C..A". This has been on
my todo list for way too long. Some day I'll send out a patch for it
and we'll see what others think.
Martin
next prev parent reply other threads:[~2011-09-08 13:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-06 16:08 git-rebase skips automatically no more needed commits Francis Moreau
2011-09-06 17:09 ` Junio C Hamano
2011-09-06 19:28 ` Francis Moreau
2011-09-07 13:19 ` Michael J Gruber
[not found] ` <CAC9WiBi_bkLNJZckq2fr3eb6ie+KVfauE_PyA3GcaW5Ga-isFw@mail.gmail.com>
2011-09-07 16:29 ` Junio C Hamano
2011-09-08 7:10 ` Francis Moreau
2011-09-08 13:14 ` Martin von Zweigbergk [this message]
[not found] ` <CAC9WiBiMYUfaPtrXyW=W7qaZnJqLeFO-B3od7X4u8wUrb8hfUA@mail.gmail.com>
2011-09-09 2:23 ` Martin von Zweigbergk
2011-09-09 6:43 ` Francis Moreau
2011-09-09 13:06 ` Martin von Zweigbergk
2011-09-09 13:25 ` Francis Moreau
2011-09-15 2:19 ` Martin von Zweigbergk
2011-09-15 3:41 ` Junio C Hamano
2011-09-16 1:27 ` Martin von Zweigbergk
2011-09-20 20:45 ` Martin von Zweigbergk
2011-09-24 9:12 ` Ramkumar Ramachandra
2011-09-25 3:25 ` Martin von Zweigbergk
2011-09-26 9:10 ` Thomas Rast
2011-09-28 14:49 ` Martin von Zweigbergk
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=alpine.DEB.2.00.1109080753460.12564@debian \
--to=martin.von.zweigbergk@gmail.com \
--cc=francis.moro@gmail.com \
--cc=git@drmicha.warpmail.net \
--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