In 9a5315edfdf (Merge branch 'js/patch-mode-in-others-in-c',
2020-02-05), Git acquired a built-in implementation of `git add`'s
interactive mode that could be turned on via the config option
`add.interactive.useBuiltin`.
The first official Git version to support this knob was v2.26.0.
In 2df2d81ddd0 (add -i: use the built-in version when
feature.experimental is set, 2020-09-08), this built-in implementation
was also enabled via `feature.experimental`. The first version with this
change was v2.29.0.
More than a year (and very few bug reports) later, it is time to declare
the built-in implementation mature and to turn it on by default.
We specifically leave the `add.interactive.useBuiltin` configuration in
place, to give users an "escape hatch" in the unexpected case should
they encounter a previously undetected bug in that implementation.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committedNov 30, 2021 at 14:14 UTC0527ccb1b558e1337f5f3e02ea9747d86a1908a8
5 files changed+11-16
Documentation/config/add.txt
+3-3
index c9f748f81c..3e859f3419 100644--- a/Documentation/config/add.txt+++ b/Documentation/config/add.txt@@ -7,6 +7,6 @@ add.ignore-errors (deprecated):: variables. add.interactive.useBuiltin::- [EXPERIMENTAL] Set to `true` to use the experimental built-in- implementation of the interactive version of linkgit:git-add[1]- instead of the Perl script version. Is `false` by default.+ Set to `false` to fall back to the original Perl implementation of+ the interactive version of linkgit:git-add[1] instead of the built-in+ version. Is `true` by default.
builtin/add.c
+5-10
index ef6b619c45..8ef230a345 100644--- a/builtin/add.c+++ b/builtin/add.c@@ -237,17 +237,12 @@ int run_add_interactive(const char *revision, const char *patch_mode, int use_builtin_add_i = git_env_bool("GIT_TEST_ADD_I_USE_BUILTIN", -1);- if (use_builtin_add_i < 0) {- int experimental;- if (!git_config_get_bool("add.interactive.usebuiltin",- &use_builtin_add_i))- ; /* ok */- else if (!git_config_get_bool("feature.experimental", &experimental) &&- experimental)- use_builtin_add_i = 1;- }+ if (use_builtin_add_i < 0 &&+ git_config_get_bool("add.interactive.usebuiltin",+ &use_builtin_add_i))+ use_builtin_add_i = 1;- if (use_builtin_add_i == 1) {+ if (use_builtin_add_i != 0) { enum add_p_mode mode; if (!patch_mode)
index 29f72354bf..2c22337d6e 100644--- a/t/README+++ b/t/README@@ -419,7 +419,7 @@ the --sparse command-line argument. GIT_TEST_PRELOAD_INDEX=<boolean> exercises the preload-index code path by overriding the minimum number of cache entries required per thread.-GIT_TEST_ADD_I_USE_BUILTIN=<boolean>, when true, enables the+GIT_TEST_ADD_I_USE_BUILTIN=<boolean>, when false, disables the built-in version of git add -i. See 'add.interactive.useBuiltin' in git-config(1).