Re: [BUG] rebase -p loses commits

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

 



Junio C Hamano <gitster@xxxxxxxxx> 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).
--
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]