]> git.ipfire.org Git - thirdparty/git.git/commitdiff
stash: stop warning about the obsolete `stash.useBuiltin` config setting
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 27 Jan 2022 22:03:51 +0000 (22:03 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 28 Jan 2022 02:00:45 +0000 (18:00 -0800)
In 8a2cd3f5123 (stash: remove the stash.useBuiltin setting, 2020-03-03),
we removed support for `stash.useBuiltin`, but left a warning in its
place.

After almost two years, and several major versions, it is time to remove
even that warning.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/stash.c
t/t3903-stash.sh

index 1ef2017c595dc09d09457affb3f5e3c3a0e352ab..25793b5a75ae868a79dae313202f69f3ef8457f8 100644 (file)
@@ -788,7 +788,6 @@ static int list_stash(int argc, const char **argv, const char *prefix)
 static int show_stat = 1;
 static int show_patch;
 static int show_include_untracked;
-static int use_legacy_stash;
 
 static int git_stash_config(const char *var, const char *value, void *cb)
 {
@@ -804,10 +803,6 @@ static int git_stash_config(const char *var, const char *value, void *cb)
                show_include_untracked = git_config_bool(var, value);
                return 0;
        }
-       if (!strcmp(var, "stash.usebuiltin")) {
-               use_legacy_stash = !git_config_bool(var, value);
-               return 0;
-       }
        return git_diff_basic_config(var, value, cb);
 }
 
@@ -1778,11 +1773,6 @@ int cmd_stash(int argc, const char **argv, const char *prefix)
 
        git_config(git_stash_config, NULL);
 
-       if (use_legacy_stash ||
-           !git_env_bool("GIT_TEST_STASH_USE_BUILTIN", -1))
-               warning(_("the stash.useBuiltin support has been removed!\n"
-                         "See its entry in 'git help config' for details."));
-
        argc = parse_options(argc, argv, prefix, options, git_stash_usage,
                             PARSE_OPT_KEEP_UNKNOWN | PARSE_OPT_KEEP_DASHDASH);
 
index 686747e55a301a661d75c63223a7d682c30dbd4b..b149e2af44185d5a78ff7eff1e2c0efb67f35f4d 100755 (executable)
@@ -1272,7 +1272,6 @@ test_expect_success 'stash works when user.name and user.email are not set' '
        >2 &&
        git add 2 &&
        test_config user.useconfigonly true &&
-       test_config stash.usebuiltin true &&
        (
                sane_unset GIT_AUTHOR_NAME &&
                sane_unset GIT_AUTHOR_EMAIL &&
@@ -1323,20 +1322,6 @@ test_expect_success 'stash handles skip-worktree entries nicely' '
        git rev-parse --verify refs/stash:A.t
 '
 
-test_expect_success 'stash -c stash.useBuiltin=false warning ' '
-       expected="stash.useBuiltin support has been removed" &&
-
-       git -c stash.useBuiltin=false stash 2>err &&
-       test_i18ngrep "$expected" err &&
-       env GIT_TEST_STASH_USE_BUILTIN=false git stash 2>err &&
-       test_i18ngrep "$expected" err &&
-
-       git -c stash.useBuiltin=true stash 2>err &&
-       test_must_be_empty err &&
-       env GIT_TEST_STASH_USE_BUILTIN=true git stash 2>err &&
-       test_must_be_empty err
-'
-
 test_expect_success 'git stash succeeds despite directory/file change' '
        test_create_repo directory_file_switch_v1 &&
        (