Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-04-16 13:28:09 +0300
committerJunio C Hamano <gitster@pobox.com>2019-04-16 13:28:09 +0300
commit4f3036cfa1ffe2470f1afafe541fea8d58d9282b (patch)
treedd4302480920e861707b1617f86a0770b7c2330a /t
parent67e3ec10d0e3a8884660105d1787322acdfc6ee5 (diff)
parentd03ebd411c651641eab823f0807705f4af65c9b1 (diff)
Merge branch 'ab/drop-scripted-rebase'
Retire scripted "git rebase" implementation. * ab/drop-scripted-rebase: rebase: remove the rebase.useBuiltin setting
Diffstat (limited to 't')
-rw-r--r--t/README4
-rwxr-xr-xt/t3400-rebase.sh16
-rwxr-xr-xt/t3404-rebase-interactive.sh9
3 files changed, 19 insertions, 10 deletions
diff --git a/t/README b/t/README
index 136913ec2d..da721d3314 100644
--- a/t/README
+++ b/t/README
@@ -384,10 +384,6 @@ the --no-sparse command-line argument.
GIT_TEST_PRELOAD_INDEX=<boolean> exercises the preload-index code path
by overriding the minimum number of cache entries required per thread.
-GIT_TEST_REBASE_USE_BUILTIN=<boolean>, when false, disables the
-builtin version of git-rebase. See 'rebase.useBuiltin' in
-git-config(1).
-
GIT_TEST_INDEX_THREADS=<n> enables exercising the multi-threaded loading
of the index for the whole test suite by bypassing the default number of
cache entries and thread minimums. Setting this to 1 will make the
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 460d0523be..42f147858d 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -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
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index b60b11f9f2..1723e1a858 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -149,12 +149,10 @@ test_expect_success 'rebase -i with the exec command checks tree cleanness' '
test_expect_success 'rebase -x with empty command fails' '
test_when_finished "git rebase --abort ||:" &&
- test_must_fail env GIT_TEST_REBASE_USE_BUILTIN=true \
- git rebase -x "" @ 2>actual &&
+ test_must_fail env git rebase -x "" @ 2>actual &&
test_write_lines "error: empty exec command" >expected &&
test_i18ncmp expected actual &&
- test_must_fail env GIT_TEST_REBASE_USE_BUILTIN=true \
- git rebase -x " " @ 2>actual &&
+ test_must_fail env git rebase -x " " @ 2>actual &&
test_i18ncmp expected actual
'
@@ -162,8 +160,7 @@ LF='
'
test_expect_success 'rebase -x with newline in command fails' '
test_when_finished "git rebase --abort ||:" &&
- test_must_fail env GIT_TEST_REBASE_USE_BUILTIN=true \
- git rebase -x "a${LF}b" @ 2>actual &&
+ test_must_fail env git rebase -x "a${LF}b" @ 2>actual &&
test_write_lines "error: exec commands cannot contain newlines" \
>expected &&
test_i18ncmp expected actual