Skip to content

Commit 62c2393

Browse files
avargitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d8d0a54 commit 62c2393

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

builtin/rebase.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ static int use_builtin_rebase(void)
4848
{
4949
struct child_process cp = CHILD_PROCESS_INIT;
5050
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;
5255

5356
argv_array_pushl(&cp.args,
5457
"config", "--bool", "rebase.usebuiltin", NULL);

t/README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,10 @@ for the index version specified. Can be set to any valid version
339339
GIT_TEST_PRELOAD_INDEX=<boolean> exercises the preload-index code path
340340
by overriding the minimum number of cache entries required per thread.
341341

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+
342346
GIT_TEST_INDEX_THREADS=<n> enables exercising the multi-threaded loading
343347
of the index for the whole test suite by bypassing the default number of
344348
cache entries and thread minimums. Setting this to 1 will make the

0 commit comments

Comments
 (0)