summaryrefslogtreecommitdiff
path: root/t/t3400-rebase.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2009-02-08 21:40:42 -0800
committerJunio C Hamano <gitster@pobox.com>2009-02-08 21:40:52 -0800
commit3ec7371f63046aa6d8e13ddeb1eaa9cccfbf2aa2 (patch)
tree312d57c0aa19b61b7e4bffab242334835960748d /t/t3400-rebase.sh
parent3021faf6562690658d0b9f9fdd7cbe8c9dd61628 (diff)
downloadgit-3ec7371f63046aa6d8e13ddeb1eaa9cccfbf2aa2.tar.gz
Add two extra tests for git rebase
Diffstat (limited to 't/t3400-rebase.sh')
-rwxr-xr-xt/t3400-rebase.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index b7a670ef40..8c0c5f5982 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -14,7 +14,8 @@ export GIT_AUTHOR_EMAIL
test_expect_success \
'prepare repository with topic branches' \
- 'echo First > A &&
+ 'git config core.logAllRefUpdates true &&
+ echo First > A &&
git update-index --add A &&
git commit -m "Add A." &&
git checkout -b my-topic-branch &&
@@ -84,4 +85,14 @@ 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 &&
+ grep "Untracked working tree file .B. would be overwritten" output.err
+'
+
test_done