Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: Automatically identifying the "split" point of a merged branch.

From: Jeff King <hidden>
Date: 2016-06-15 22:51:41

On Sat, Jul 30, 2011 at 05:54:59PM -0700, Conrad Irwin wrote:
I wanted to introduce this branch onto master to end up with:

A-o-o-o-o-o-o-o-o-o-E-----------N (master)
 \                   \         /
  \                   C'-o-o-D' (topic-rebased)
   \
    o-o-B-o-o-o-o-M-o-o(integration)
         \       /
          C-o-o-D (topic)

(ASCII art reproduced at http://dpaste.org/GUmM/ lest it be munged)

While it's easy to create comit N once I have commit D' (with git
merge --no-ff), I found that it's not at all easy to work out where
commit B is in order to do do a rebase --onto master B.
If you know M, then B is the merge-base of M^1 and M^2 (i.e., the
parents of M). If you don't know M, but do know D, you can find it by
walking backwards from "integration" until you find a merge commit with
D as its second parent (e.g., by grepping "rev-list --parents").

Make sense?

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help