t1450: make hash size independent
[gitweb.git] / t / t3400-rebase.sh
index 460d0523be6f35e4477a010edd365c1f8fbd431c..80b23fd3269c7828660469207728f67087c82467 100755 (executable)
@@ -285,7 +285,7 @@ EOF
        test_cmp From_.msg out
 '
 
-test_expect_success 'rebase--am.sh and --show-current-patch' '
+test_expect_success 'rebase --am and --show-current-patch' '
        test_create_repo conflict-apply &&
        (
                cd conflict-apply &&
@@ -319,4 +319,20 @@ test_expect_success 'rebase--merge.sh and --show-current-patch' '
        )
 '
 
+test_expect_success 'rebase -c rebase.useBuiltin=false warning' '
+       expected="rebase.useBuiltin support has been removed" &&
+
+       # Only warn when the legacy rebase is requested...
+       test_must_fail git -c rebase.useBuiltin=false rebase 2>err &&
+       test_i18ngrep "$expected" err &&
+       test_must_fail env GIT_TEST_REBASE_USE_BUILTIN=false git rebase 2>err &&
+       test_i18ngrep "$expected" err &&
+
+       # ...not when we would have used the built-in anyway
+       test_must_fail git -c rebase.useBuiltin=true rebase 2>err &&
+       test_must_be_empty err &&
+       test_must_fail env GIT_TEST_REBASE_USE_BUILTIN=true git rebase 2>err &&
+       test_must_be_empty err
+'
+
 test_done