diff options
| author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2019-02-25 23:16:31 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-03-07 09:41:40 +0900 |
| commit | 7906af0cb84c8e65656347909abd4e22b04d1c1e (patch) | |
| tree | 4964b04adb09c7eadf583baf745b8391e2c78753 /builtin/stash.c | |
| parent | 90a462725ef3932a2408e78a47e3dfc1b8d445cf (diff) | |
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
62c23938fae5 (tests: add a special setup where rebase.useBuiltin is off,
2018-11-14).
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/stash.c')
| -rw-r--r-- | builtin/stash.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin/stash.c b/builtin/stash.c index 49c6d7948a..1bfa24030c 100644 --- a/builtin/stash.c +++ b/builtin/stash.c @@ -1515,7 +1515,10 @@ static int use_builtin_stash(void) { struct child_process cp = CHILD_PROCESS_INIT; struct strbuf out = STRBUF_INIT; - int ret; + int ret, env = git_env_bool("GIT_TEST_STASH_USE_BUILTIN", -1); + + if (env != -1) + return env; argv_array_pushl(&cp.args, "config", "--bool", "stash.usebuiltin", NULL); |
