Code

Fix typo in git-gc document.
[git.git] / t / t3400-rebase.sh
index 083d76814d93b2b8c886e19040561f3cab9e7ccc..349eebd54268c927249322dc22fc478869860f7c 100755 (executable)
@@ -19,7 +19,16 @@ test_expect_success 'prepare repository with topic branches' '
        echo First >A &&
        git update-index --add A &&
        git commit -m "Add A." &&
-       git checkout -b my-topic-branch &&
+       git checkout -b force-3way &&
+       echo Dummy >Y &&
+       git update-index --add Y &&
+       git commit -m "Add Y." &&
+       git checkout -b filemove &&
+       git reset --soft master &&
+       mkdir D &&
+       git mv A D/A &&
+       git commit -m "Move A." &&
+       git checkout -b my-topic-branch master &&
        echo Second >B &&
        git update-index --add B &&
        git commit -m "Add B." &&
@@ -128,10 +137,24 @@ test_expect_success 'rebase a single mode change' '
        GIT_TRACE=1 git rebase master
 '
 
+test_expect_success 'rebase is not broken by diff.renames' '
+       git config diff.renames copies &&
+       test_when_finished "git config --unset diff.renames" &&
+       git checkout filemove &&
+       GIT_TRACE=1 git rebase force-3way
+'
+
+test_expect_success 'setup: recover' '
+       test_might_fail git rebase --abort &&
+       git reset --hard &&
+       git checkout modechange
+'
+
 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
+       grep "The following untracked working tree files would be overwritten by checkout:" output.err &&
+       grep B output.err
 '
 rm -f B