Skip to content

Commit a74c068

Browse files
committed
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 <[email protected]> --- Documentation/config/add.txt | 6 ------ builtin/add.c | 6 +----- t/t3701-add-interactive.sh | 15 --------------- 3 files changed, 1 insertion(+), 26 deletions(-)
1 parent 7b0defb commit a74c068

File tree

3 files changed

+1
-26
lines changed

3 files changed

+1
-26
lines changed

Documentation/config/add.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,3 @@ add.ignore-errors (deprecated)::
55
option of linkgit:git-add[1]. `add.ignore-errors` is deprecated,
66
as it does not follow the usual naming convention for configuration
77
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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,7 @@ static int refresh(int verbose, const struct pathspec *pathspec)
150150
int interactive_add(const char **argv, const char *prefix, int patch)
151151
{
152152
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;
158154

159155
parse_pathspec(&pathspec, 0,
160156
PATHSPEC_PREFER_FULL |

t/t3701-add-interactive.sh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,6 @@ force_color () {
4343
)
4444
}
4545

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-
6146
test_expect_success 'unknown command' '
6247
test_when_finished "git reset --hard; rm -f command" &&
6348
echo W >command &&

0 commit comments

Comments
 (0)