Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [BUG] rebase -p loses commits

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:15

Junio C Hamano [off-list ref] writes:
But the above "preserving" rewrite does not even preserve the topology of
the graph (the original * is a true merge between two forks, but *' is
not) to begin with.  Also, if you want to _usefully_ place F' on top of M,
such a rewrite should resolve possible conflicts that was resolved at * in
the original graph at F' anyway, which would mean that the resulting *'
should become a totally empty commit.

Why would anybody want to do such a thing to begin with?
Note that I am not saying "rebase -p" is not useful in general.  If you
had

         x---x---x---W---X
        /             \   \
    ---M               Y---Z

it is entirely sensible to want to have this history to exclude 'x'

         x---x---x---W---X
        /             \   \
    ---M---W'--X'      Y---Z
            \   \
             Y'--Z'

I think the patch I posted earlier should stop the problematic case Jeff
mentioned from happening, but I am trying to see if it makes sense to stop
without doing anything even when it is forced when onto and merge-base are
the same commit (which is not true for this "sensible" case).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help