Skip to content

Commit df1bebe

Browse files
committed
tests: add a special setup where stash.useBuiltin is off
Add a GIT_TEST_STASH_USE_BUILTIN=false test mode which is equivalent to running with stash.useBuiltin=false. This is needed to spot that we're not introducing any regressions in the legacy stash version while we're carrying both it and the new built-in version. This imitates the equivalent treatment for the built-in rebase in 62c2393 (tests: add a special setup where rebase.useBuiltin is off, 2018-11-14). Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Thomas Gummerer <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7d9d62e commit df1bebe

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

builtin/stash.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1517,7 +1517,10 @@ static int use_builtin_stash(void)
15171517
{
15181518
struct child_process cp = CHILD_PROCESS_INIT;
15191519
struct strbuf out = STRBUF_INIT;
1520-
int ret;
1520+
int ret, env = git_env_bool("GIT_TEST_STASH_USE_BUILTIN", -1);
1521+
1522+
if (env != -1)
1523+
return env;
15211524

15221525
argv_array_pushl(&cp.args,
15231526
"config", "--bool", "stash.usebuiltin", NULL);

t/README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,10 @@ GIT_TEST_REBASE_USE_BUILTIN=<boolean>, when false, disables the
383383
builtin version of git-rebase. See 'rebase.useBuiltin' in
384384
git-config(1).
385385

386+
GIT_TEST_STASH_USE_BUILTIN=<boolean>, when false, disables the
387+
built-in version of git-stash. See 'stash.useBuiltin' in
388+
git-config(1).
389+
386390
GIT_TEST_INDEX_THREADS=<n> enables exercising the multi-threaded loading
387391
of the index for the whole test suite by bypassing the default number of
388392
cache entries and thread minimums. Setting this to 1 will make the

0 commit comments

Comments
 (0)