mirror of
https://github.com/git/git.git
synced 2026-03-13 10:23:30 +01:00
t3400-rebase: Move detached HEAD check earlier
3ec7371f (Add two extra tests for git rebase, 2009-02-09) added a check
that rebase works on a detached HEAD. For this check, the last test
was picked, whose topic is to rebase a mode change. This rebase operation
amounts to a no-op on Windows/MinGW so that HEAD@{1} *is* modechange@{1},
and the intended detached HEAD test fails.
This patch moves the check earlier, into the group of tests that check
basic rebase properties.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
This commit is contained in:
@@ -48,6 +48,10 @@ test_expect_success \
|
||||
'the rebase operation should not have destroyed author information' \
|
||||
'! (git log | grep "Author:" | grep "<>")'
|
||||
|
||||
test_expect_success 'HEAD was detached during rebase' '
|
||||
test $(git rev-parse HEAD@{1}) != $(git rev-parse my-topic-branch@{1})
|
||||
'
|
||||
|
||||
test_expect_success 'rebase after merge master' '
|
||||
git reset --hard topic &&
|
||||
git merge master &&
|
||||
@@ -85,10 +89,6 @@ test_expect_success 'rebase a single mode change' '
|
||||
GIT_TRACE=1 git rebase master
|
||||
'
|
||||
|
||||
test_expect_success 'HEAD was detached during rebase' '
|
||||
test $(git rev-parse HEAD@{1}) != $(git rev-parse modechange@{1})
|
||||
'
|
||||
|
||||
test_expect_success 'Show verbose error when HEAD could not be detached' '
|
||||
: > B &&
|
||||
test_must_fail git rebase topic 2> output.err > output.out &&
|
||||
|
||||
Reference in New Issue
Block a user