Add two extra tests for git rebase
This commit is contained in:
parent
3021faf656
commit
3ec7371f63
@ -14,7 +14,8 @@ export GIT_AUTHOR_EMAIL
|
|||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
'prepare repository with topic branches' \
|
'prepare repository with topic branches' \
|
||||||
'echo First > A &&
|
'git config core.logAllRefUpdates true &&
|
||||||
|
echo First > A &&
|
||||||
git update-index --add A &&
|
git update-index --add A &&
|
||||||
git commit -m "Add A." &&
|
git commit -m "Add A." &&
|
||||||
git checkout -b my-topic-branch &&
|
git checkout -b my-topic-branch &&
|
||||||
@ -84,4 +85,14 @@ test_expect_success 'rebase a single mode change' '
|
|||||||
GIT_TRACE=1 git rebase master
|
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 &&
|
||||||
|
grep "Untracked working tree file .B. would be overwritten" output.err
|
||||||
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
Loading…
Reference in New Issue
Block a user