File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ export GIT_AUTHOR_EMAIL
1414
1515test_expect_success \
1616 ' prepare repository with topic branches' \
17- ' echo First > A &&
17+ ' git config core.logAllRefUpdates true &&
18+ echo First > A &&
1819 git update-index --add A &&
1920 git commit -m "Add A." &&
2021 git checkout -b my-topic-branch &&
@@ -84,4 +85,14 @@ test_expect_success 'rebase a single mode change' '
8485 GIT_TRACE=1 git rebase master
8586'
8687
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+
8798test_done
You can’t perform that action at this time.
0 commit comments