diff options
| author | Junio C Hamano <gitster@pobox.com> | 2018-11-18 18:23:59 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-11-18 18:23:59 +0900 |
| commit | 4520c233742cca267e1c0ba55f04f35ef7e9baf7 (patch) | |
| tree | c492d0450700e918465d75e01e924d18f9327b2a | |
| parent | 137c1f2f51bceb8d1f1f457c52129be78c0ac86d (diff) | |
| parent | 62c23938fae5b7a374388c64fbdf8ee9ecb51b92 (diff) | |
| download | git-4520c233742cca267e1c0ba55f04f35ef7e9baf7.tar.gz | |
Merge branch 'ab/rebase-in-c-escape-hatch'
The recently merged "rebase in C" has an escape hatch to use the
scripted version when necessary, but it hasn't been documented,
which has been corrected.
* ab/rebase-in-c-escape-hatch:
tests: add a special setup where rebase.useBuiltin is off
rebase doc: document rebase.useBuiltin
| -rw-r--r-- | Documentation/config/rebase.txt | 14 | ||||
| -rw-r--r-- | builtin/rebase.c | 5 | ||||
| -rw-r--r-- | t/README | 4 |
3 files changed, 22 insertions, 1 deletions
diff --git a/Documentation/config/rebase.txt b/Documentation/config/rebase.txt index 42e1ba7575..f079bf6b7e 100644 --- a/Documentation/config/rebase.txt +++ b/Documentation/config/rebase.txt @@ -1,3 +1,17 @@ +rebase.useBuiltin:: + Set to `false` to use the legacy shellscript implementation of + linkgit:git-rebase[1]. Is `true` by default, which means use + the built-in rewrite of it in C. ++ +The C rewrite is first included with Git version 2.20. This option +serves an an escape hatch to re-enable the legacy version in case any +bugs are found in the rewrite. This option and the shellscript version +of linkgit:git-rebase[1] will be removed in some future release. ++ +If you find some reason to set this option to `false` other than +one-off testing you should report the behavior difference as a bug in +git. + rebase.stat:: Whether to show a diffstat of what changed upstream since the last rebase. False by default. diff --git a/builtin/rebase.c b/builtin/rebase.c index 8353a71e21..1a2758756a 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -49,7 +49,10 @@ static int use_builtin_rebase(void) { struct child_process cp = CHILD_PROCESS_INIT; struct strbuf out = STRBUF_INIT; - int ret; + int ret, env = git_env_bool("GIT_TEST_REBASE_USE_BUILTIN", -1); + + if (env != -1) + return env; argv_array_pushl(&cp.args, "config", "--bool", "rebase.usebuiltin", NULL); @@ -339,6 +339,10 @@ for the index version specified. Can be set to any valid version 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 |
