Re: request for documentation about branch surgery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 7 Jul 2009, Bruno Haible wrote:

> 6) Also, it would be good to have a section "Reconnecting branches after rebase".
>    If you want to reconnect a branch to a rebased master, here's how to do it:
> 
>                    /--C'--...---P'--Q'--...---Z'  new rebased master
>               A---B---C---...---P---Q---...---Z   old master
>                                  \
>                                   --BA---...---BZ  release-branch
> 
>   =>
>               A---B---C'--...---P'--Q'--...---Z'  new rebased master
>                                  \
>                                   --BA---...---BZ  release-branch

This is impossible; the parent of BA is P, not P'.

                   /--C'--...---P'--Q'--...---Z'  new rebased master
              A---B---C---...---P---Q---...---Z   old master
                                 \
                                  --BA---...---BZ  release-branch

  =>
                                  --BA'--...---BZ' release branch
                                 /
                   /--C'--...---P'--Q'--...---Z'  new rebased master
              A---B---C---...---P---Q---...---Z
                                 \
                                  --BA---...---BZ

In order to draw well-formed tree sequences, you can only add items to the 
trees, and only use each letter once in the whole thing. When you've got a 
complete history following those rules, you can elide parts of the history 
that aren't referenced any more, but you still can't reuse their letters.

You're drawing some of your trees as if it were possible to have commits 
that are not eq but are equal; in fact, all information about a commit, 
including its parentage, is immutable and contributes to the way it is 
referenced, so any equal commits are eq (and therefore only appear in one 
spot on the graph).

	-Daniel
*This .sig left intentionally blank*
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]