@matheusbsbs / matheus-bagliano / commits / 3ec7371f63
Fork 0

Add two extra tests for git rebase

Johannes Schindelin committed Feb 8, 2009 at 21:40 UTC 3ec7371f63046aa6d8e13ddeb1eaa9cccfbf2aa2
1 file changed +12 -1
t/t3400-rebase.sh
+12 -1
@@ -14,7 +14,8 @@ export GIT_AUTHOR_EMAIL
14
15 test_expect_success \
16 'prepare repository with topic branches' \
17 - 'echo First > A &&
17 + 'git config core.logAllRefUpdates true &&
18 + echo First > A &&
19 git update-index --add A &&
20 git commit -m "Add A." &&
21 git checkout -b my-topic-branch &&
@@ -84,4 +85,14 @@ test_expect_success 'rebase a single mode change' '
85 GIT_TRACE=1 git rebase master
86 '
87
88 +test_expect_success 'HEAD was detached during rebase' '
89 + test $(git rev-parse HEAD@{1}) != $(git rev-parse modechange@{1})
90 +'
91 +
92 +test_expect_success 'Show verbose error when HEAD could not be detached' '
93 + : > B &&
94 + test_must_fail git rebase topic 2> output.err > output.out &&
95 + grep "Untracked working tree file .B. would be overwritten" output.err
96 +'
97 +
98 test_done