rebase -i: work on a detached HEAD
Earlier, rebase -i refused to rebase a detached HEAD. Now it no longer does. Incidentally, this fixes "git gc --auto" shadowing the true exit status. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
61ab92df40
commit
73697a0b57
@ -309,4 +309,12 @@ test_expect_success '--continue tries to commit, even for "edit"' '
|
||||
test $parent = $(git rev-parse HEAD^)
|
||||
'
|
||||
|
||||
test_expect_success 'rebase a detached HEAD' '
|
||||
grandparent=$(git rev-parse HEAD~2) &&
|
||||
git checkout $(git rev-parse HEAD) &&
|
||||
test_tick &&
|
||||
FAKE_LINES="2 1" git rebase -i HEAD~2 &&
|
||||
test $grandparent = $(git rev-parse HEAD~2)
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user