add-i: finally retire add.interactive.useBuiltin
The configuration variable stopped doing anything (other than announcing itself as a variable that does not do anything useful, when it is used) in Git 2.40. At this point, it is not even worth giving the warning, which was meant to be a way to help users notice they are carrying unused cruft in their configuration files and give them a chance to clean-up. Let's remove the warning and documentation for it, and truly stop paying attention to it. Signed-off-by: Junio C Hamano <gitster@pobox.com> --- Documentation/config/add.txt | 6 ------ builtin/add.c | 6 +----- t/t3701-add-interactive.sh | 15 --------------- 3 files changed, 1 insertion(+), 26 deletions(-)
Junio C Hamano committed
Jun 5, 2024 at 14:27 UTC
a74c0686fa3b735ea9e90fc498527da31bd7ae75
3 files changed
+1
-26
Documentation/config/add.txt
-6
@@ -5,9 +5,3 @@ add.ignore-errors (deprecated)::
5
option of linkgit:git-add[1]. `add.ignore-errors` is deprecated,
6
as it does not follow the usual naming convention for configuration
7
variables.
8
-
9
-add.interactive.useBuiltin::
10
- Unused configuration variable. Used in Git versions v2.25.0 to
11
- v2.36.0 to enable the built-in version of linkgit:git-add[1]'s
12
- interactive mode, which then became the default in Git
13
- versions v2.37.0 to v2.39.0.
builtin/add.c
+1
-5
@@ -150,11 +150,7 @@ static int refresh(int verbose, const struct pathspec *pathspec)
150
int interactive_add(const char **argv, const char *prefix, int patch)
151
{
152
struct pathspec pathspec;
153
- int unused, ret;
154
-
155
- if (!git_config_get_bool("add.interactive.usebuiltin", &unused))
156
- warning(_("the add.interactive.useBuiltin setting has been removed!\n"
157
- "See its entry in 'git help config' for details."));
153
+ int ret;
154
155
parse_pathspec(&pathspec, 0,
156
PATHSPEC_PREFER_FULL |
t/t3701-add-interactive.sh
-15
@@ -43,21 +43,6 @@ force_color () {
43
)
44
}
45
46
-test_expect_success 'warn about add.interactive.useBuiltin' '
47
- cat >expect <<-\EOF &&
48
- warning: the add.interactive.useBuiltin setting has been removed!
49
- See its entry in '\''git help config'\'' for details.
50
- EOF
51
- echo "No changes." >expect.out &&
52
-
53
- for v in = =true =false
54
- do
55
- git -c "add.interactive.useBuiltin$v" add -p >out 2>actual &&
56
- test_cmp expect.out out &&
57
- test_cmp expect actual || return 1
58
- done
59
-'
60
-
46
test_expect_success 'unknown command' '
47
test_when_finished "git reset --hard; rm -f command" &&
48
echo W >command &&