From: Andreas Ericsson <ae@op5•se>
To: Stephen Haberman <stephen@exigencecorp•com>
Cc: Johannes Sixt <j.sixt@viscovery•net>, git@vger•kernel.org
Subject: Re: rebasing merges
Date: Tue, 23 Sep 2008 10:20:58 +0200 [thread overview]
Message-ID: <48D8A6EA.4020805@op5.se> (raw)
In-Reply-To: <20080923024653.a3bb8666.stephen@exigencecorp.com>
Stephen Haberman wrote:
>> This is the expected behavior and not up for debate.
>
> Cool, thanks for the reply. However, I debate... :-)
>
>> ---o--o--o--o--o--o <-- origin
>> \
>> A'--B' <-- master
>
> Nice. That makes sense in your scenario.
>
> Here is mine:
>
> ---A--B--C--D <-- origin/stable
> \ |
> E--F | <-- origin/topica
> \ |
> g--h <-- topica
>
> All the upper case commits have been published to origin. Other
> devs, etc., know about them, their hashes are in the bug tracking
> system.
>
> I'm bringing topica up to date, but with a merge because I have
> published history already on topica, so I merge stable and get a
> new merge commit: g. And maybe make another change: h.
>
Why do you merge stable at this point?
If you want the latest and greatest for testing/conflict resolution
purposes, you can simply throw away the merge later and just know
that it works.
If you need some bugfix on stable but not everything else, cherrypick
only that change. Otherwise you're applying a huge patch to fix a
small problem.
> Everything's cool...now, with surprising frequency, someone beats
> me to moving origin/topica:
>
> ---A--B--C--D <-- origin/stable
> \ |
> E--F---|--I <-- origin/topica
> \ |
> g--h <-- topica
>
> Pushing h gets rejected as a rewind. Good. I want to pull, which
> we had previously always used "--rebase" for, and the desired output
> of a pull --rebase, to me, would be:
>
> ---A--B--C--D <-- origin/stable
> \ \
> E--F--I | <-- origin/topica
> \|
> g'--h' <-- topica
>
> Instead, I get:
>
> ---A--B--C--D <-- origin/stable
> \
> E--F--I <-- origin/topica
> \
> B'-C'-D'-h'<-- topica
>
> So, yes, linearized history with no merges. However, this leads
> to quizzical looks when B'/C'/D' hit the email list, bug tracker, etc.
> as new commits.
>
> Currently I just try to pull/merge/push in quick succession, but
> it's a manual collaboration hack ("okay, I'm merging now, no
> committing...") that would be nice to not have to worry about.
>
I think you just need to ask yourself *why* you're doing that
first merge of "stable" into your topic. If they aren't really
separate, using a topic-branch doesn't make so much sense. If
they *are* separate, doing the merge doesn't make much sense,
unless you're integration testing a snapshot build, but in that
case you'd want to throw away the merge once it's done and
tested.
> I need to investigate the interactive rebase more, but my hesitant
> assertion is that it's parent rewriting seems smart enough to handle
> this. Perhaps not, and I admit our desired DAG output may not be
> attainable without manual intervention.
>
> I apologize--I should have included the example DAGs in my first
> post, but since I didn't I felt the need to clarify. So, humoring
> me, is the B'/C'/D' from this example really the expected behavior?
>
Assuming the person who did "h" doesn't have the merge commit, then
yes.
--
Andreas Ericsson andreas.ericsson@op5•se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
next prev parent reply other threads:[~2008-09-23 8:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-22 20:57 rebasing merges Stephen Haberman
2008-09-23 4:19 ` Stephen Haberman
2008-09-23 6:09 ` Johannes Sixt
2008-09-23 7:30 ` Samuel Tardieu
2008-09-23 7:52 ` Johannes Sixt
2008-09-23 8:06 ` Andreas Ericsson
2008-09-23 7:46 ` Stephen Haberman
2008-09-23 8:00 ` Johannes Sixt
2008-09-23 8:20 ` Andreas Ericsson [this message]
2008-09-23 9:03 ` Stephen Haberman
2008-09-23 9:11 ` Andreas Ericsson
2008-09-23 9:30 ` Stephen Haberman
2008-09-23 18:29 ` Stephen Haberman
2008-09-23 11:16 ` SZEDER Gábor
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=48D8A6EA.4020805@op5.se \
--to=ae@op5$(echo .)se \
--cc=git@vger$(echo .)kernel.org \
--cc=j.sixt@viscovery$(echo .)net \
--cc=stephen@exigencecorp$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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