Allow rebase to run if upstream is completely merged
commit1308c17b3e6bd3f5636f5b9bcadb2fbdf559009d
authorJohannes Sixt <johannes.sixt@telecom.at>
Wed, 4 Jul 2007 20:09:10 +0000 (4 22:09 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 Jul 2007 04:12:39 +0000 (4 21:12 -0700)
treeed1ac272833101767363d37c4a5a49d36f4db23c
parentd97bc5de929e525add9977a9c1ab3834b8c04657
Allow rebase to run if upstream is completely merged

Consider this history:

  o--o-...-B          <- origin
      \     \
       x--x--M--x--x  <- master

In this situation, rebase considers master fully up-to-date and would
not do anything. However, if there were additional commits on origin,
the rebase would run and move the commits x on top of origin.

Here we change rebase to short-circuit out only if the history since origin
is strictly linear. Consequently, the above as well as a history like this
would be linearized:

  o--o               <- origin
      \
       x--x
        \  \
         x--M--x--x  <- master

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase.sh
t/t3400-rebase.sh