]> rtime.felk.cvut.cz Git - git.git/blobdiff - t/t3404-rebase-interactive.sh
Merge branch 'do/rebase-i-arbitrary'
[git.git] / t / t3404-rebase-interactive.sh
index 19668c2c9206c5dfe63a5992bc7d011a9cdb4083..b0b43c6d329cacf24fd9ea6d69320e13d34b154c 100755 (executable)
@@ -577,4 +577,13 @@ test_expect_success 'rebase -i can copy notes over a fixup' '
        test_cmp expect output
 '
 
+test_expect_success 'rebase while detaching HEAD' '
+       git symbolic-ref HEAD &&
+       grandparent=$(git rev-parse HEAD~2) &&
+       test_tick &&
+       FAKE_LINES="2 1" git rebase -i HEAD~2 HEAD^0 &&
+       test $grandparent = $(git rev-parse HEAD~2) &&
+       test_must_fail git symbolic-ref HEAD
+'
+
 test_done