tests: add a special setup where rebase.useBuiltin is off

Add a GIT_TEST_REBASE_USE_BUILTIN=false test mode which is equivalent to running with rebase.useBuiltin=false. This is needed to spot that we're not introducing any regressions in the legacy rebase version while we're carrying both it and the new builtin version. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Nov 14, 2018 at 09:15 UTC 62c23938fae5b7a374388c64fbdf8ee9ecb51b92
2 files changed +8 -1
builtin/rebase.c
+4 -1
@@ -48,7 +48,10 @@ static int use_builtin_rebase(void)
48 {
49 struct child_process cp = CHILD_PROCESS_INIT;
50 struct strbuf out = STRBUF_INIT;
51 - int ret;
51 + int ret, env = git_env_bool("GIT_TEST_REBASE_USE_BUILTIN", -1);
52 +
53 + if (env != -1)
54 + return env;
55
56 argv_array_pushl(&cp.args,
57 "config", "--bool", "rebase.usebuiltin", NULL);
t/README
+4
@@ -339,6 +339,10 @@ for the index version specified. Can be set to any valid version
339 GIT_TEST_PRELOAD_INDEX=<boolean> exercises the preload-index code path
340 by overriding the minimum number of cache entries required per thread.
341
342 +GIT_TEST_REBASE_USE_BUILTIN=<boolean>, when false, disables the
343 +builtin version of git-rebase. See 'rebase.useBuiltin' in
344 +git-config(1).
345 +
346 GIT_TEST_INDEX_THREADS=<n> enables exercising the multi-threaded loading
347 of the index for the whole test suite by bypassing the default number of
348 cache entries and thread minimums. Setting this to 1 will make the