From: Michael Haggerty <mhagger@alum.mit.edu>
To: "Björn Steinbrink" <B.Steinbrink@gmx.de>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: rebase-with-history -- a technique for rebasing without trashing your repo history
Date: Fri, 14 Aug 2009 23:21:01 +0200 [thread overview]
Message-ID: <4A85D53D.9050805@alum.mit.edu> (raw)
In-Reply-To: <20090813233027.GA19833@atjola.homenet>
Björn Steinbrink wrote:
> On 2009.08.14 00:39:48 +0200, Michael Haggerty wrote:
>> Björn Steinbrink wrote:
>>> On 2009.08.13 14:46:07 +0200, Michael Haggerty wrote:
>>> And even for just continously forward porting a series of commits, a
>>> common case might be that upstream applied some patches, but not all.
>>> Can you deal with that?
[A discussion of various unsatisfactory approaches omitted...]
> But that's obviously total crap.
So I think we agree that it is not possible to retain history for a case
like this (which is essentially a general cherry-pick).
> [...]
> Doing a plain "git rebase subsystem topic" would of course also try to
> rebase the "o" commits, so that problematic. Instead, you do:
>
> git rebase --onto subsystem O topic
>
> That turns O..topic (the * commits) into patches, and applies them on
> top of O'. So the "o" commits aren't to be rebased.
>
> And that's exactly what your rebase-with-history would do as well. Just
> that O is naturally a common ancestor of subsystem and topic, and so
> just using "git rebase-w-h subsystem topic" would be enough. Conflicts
> etc. should be 100% the same.
>
> If you know that your upstream is going to rebase/rewrite history, you
> can tag (or otherwise mark) the current branching point of your branch,
> so you can easily specify it for the --onto rebase. IOW: This is
> primarily a social problem (tell your downstream that you rebase this or
> that branch), but having built-in support to store the branching point
> for rebasing _might_ be worth a thought.
Recording branch points manually, coordinating merges via email -- OMG
you are giving me flashbacks of CVS ;-)
*Of course* you can get around all of these problems if you put the
burden of bookkeeping on the user. The whole point of
rebase-with-history is to have the VCS handle it automatically!
>> and merging in a topic branch makes it more difficult to create an
>> easily-reviewable patch series. rebase-with-history has neither of
>> these problems.
>
> Sure, merging is a no-go if you submit patches by email (or other,
> similar means). But you compared that to an "enhanced" rebase approach,
> instead of comparing your rebase approach to the currently available
> one.
In [1] I compared rebase-with-history with both of the
currently-available options (rebase and merge). Rebase and merge can
each deal with some of the issues that come up, but each one falls flat
on others. I believe that rebase-with-history has the advantages of both.
The example in [2] was taken straight from the git-rebase man page [3];
I did not want to claim that current practice would use merging in this
situation, but rather just to show that rebase-with-history removes the
pain from this well-known example.
I think we are mostly in agreement. Rebase-with-history is obviously
not an earth-shattering revolution in DVCS technology, but my hope is
that it could unobtrusively assist with a few minor pain points.
Michael
[1]
http://softwareswirl.blogspot.com/2009/04/truce-in-merge-vs-rebase-war.html
[2]
http://softwareswirl.blogspot.com/2009/08/upstream-rebase-just-works-if-history.html
[3] http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html
next prev parent reply other threads:[~2009-08-14 21:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-13 12:46 rebase-with-history -- a technique for rebasing without trashing your repo history Michael Haggerty
2009-08-13 16:12 ` Björn Steinbrink
2009-08-13 22:39 ` Michael Haggerty
2009-08-13 23:30 ` Björn Steinbrink
2009-08-14 21:21 ` Michael Haggerty [this message]
2009-08-14 21:40 ` Nanako Shiraishi
2009-08-15 3:36 ` Björn Steinbrink
2009-08-14 3:17 ` Sitaram Chamarty
2009-08-13 17:39 ` Bryan O'Sullivan
2009-08-13 20:31 ` Abderrahim Kitouni
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=4A85D53D.9050805@alum.mit.edu \
--to=mhagger@alum.mit.edu \
--cc=B.Steinbrink@gmx.de \
--cc=git@vger.kernel.org \
/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.