{"thread":{"id":"57325","subject":"[PATCH 0/4] Really retire git-legacy-stash.sh","startedAt":"2022-01-27T22:03:55Z","lastAt":"2022-01-28T01:59:45Z","messageCount":6,"participants":["Johannes Schindelin via GitGitGadget","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"447140","messageId":"pull.1133.git.1643321031.gitgitgadget@gmail.com","threadId":"57325","inReplyTo":null,"subject":"[PATCH 0/4] Really retire git-legacy-stash.sh","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-01-27T22:03:47Z","receivedAt":"2022-01-27T22:03:55Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"After proving out git stash for a very long time as a shell script, we\neventually converted it to a proper built-in, leaving an escape hatch in\nplace to call the scripted version.\n\nAfter another very long time, we removed that escape hatch, leaving behind a\nwarning.\n\nNow, almost two years later, let's remove even that warning (and a couple of\ntidbits that we inadvertently left in the code base).\n\nJohannes Schindelin (4):\n  git-sh-setup: remove remnant bits referring to `git-legacy-stash`\n  add: remove support for `git-legacy-stash`\n  Remove documentation for `stash.useBuiltin`\n  stash: stop warning about the obsolete `stash.useBuiltin` config\n    setting\n\n Documentation/config/stash.txt |  7 -------\n builtin/add.c                  | 14 --------------\n builtin/stash.c                | 10 ----------\n git-sh-setup.sh                |  1 -\n t/t3903-stash.sh               | 15 ---------------\n 5 files changed, 47 deletions(-)\n\n\nbase-commit: 89bece5c8c96f0b962cfc89e63f82d603fd60bed\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1133%2Fdscho%2Freally-retire-legacy-stash-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1133/dscho/really-retire-legacy-stash-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1133\n-- \ngitgitgadget\n"},{"id":"447141","messageId":"78676cee5f75e7928ce31e929b872f50b6819e51.1643321031.git.gitgitgadget@gmail.com","threadId":"57325","inReplyTo":"pull.1133.git.1643321031.gitgitgadget@gmail.com","subject":"[PATCH 1/4] git-sh-setup: remove remnant bits referring to `git-legacy-stash`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-01-27T22:03:48Z","receivedAt":"2022-01-27T22:03:57Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn 8a2cd3f5123 (stash: remove the stash.useBuiltin setting, 2020-03-03),\nwe removed `git-legacy-stash.sh`. But `git-sh-setup.sh` somehow still\nthinks about it. Let's just not.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n git-sh-setup.sh | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/git-sh-setup.sh b/git-sh-setup.sh\nindex b93f39288ce..d92df37e992 100644\n--- a/git-sh-setup.sh\n+++ b/git-sh-setup.sh\n@@ -101,7 +101,6 @@ $LONG_USAGE\")\"\n \tcase \"$1\" in\n \t\t-h)\n \t\techo \"$LONG_USAGE\"\n-\t\tcase \"$0\" in *git-legacy-stash) exit 129;; esac\n \t\texit\n \tesac\n fi\n-- \ngitgitgadget\n\n"},{"id":"447142","messageId":"0e6625fed2a8d1c7c842234e946af19c69950eb7.1643321031.git.gitgitgadget@gmail.com","threadId":"57325","inReplyTo":"pull.1133.git.1643321031.gitgitgadget@gmail.com","subject":"[PATCH 2/4] add: remove support for `git-legacy-stash`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-01-27T22:03:49Z","receivedAt":"2022-01-27T22:03:58Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn 90a6bb98d11 (legacy stash -p: respect the add.interactive.usebuiltin\nsetting, 2019-12-21), we added support to use the built-in `add -p` from\nthe scripted `stash -p`.\n\nIn 8a2cd3f5123 (stash: remove the stash.useBuiltin setting, 2020-03-03),\nwe retired the scripted `stash` (including the scripted `stash -p`).\n\nTherefore this support is no longer necessary.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n builtin/add.c | 14 --------------\n 1 file changed, 14 deletions(-)\n\ndiff --git a/builtin/add.c b/builtin/add.c\nindex 84dff3e7969..3ffb86a4338 100644\n--- a/builtin/add.c\n+++ b/builtin/add.c\n@@ -32,7 +32,6 @@ static int add_renormalize;\n static int pathspec_file_nul;\n static int include_sparse;\n static const char *pathspec_from_file;\n-static int legacy_stash_p; /* support for the scripted `git stash` */\n \n struct update_callback_data {\n \tint flags;\n@@ -388,8 +387,6 @@ static struct option builtin_add_options[] = {\n \t\t   N_(\"override the executable bit of the listed files\")),\n \tOPT_HIDDEN_BOOL(0, \"warn-embedded-repo\", &warn_on_embedded_repo,\n \t\t\tN_(\"warn when adding an embedded repository\")),\n-\tOPT_HIDDEN_BOOL(0, \"legacy-stash-p\", &legacy_stash_p,\n-\t\t\tN_(\"backend for `git stash -p`\")),\n \tOPT_PATHSPEC_FROM_FILE(&pathspec_from_file),\n \tOPT_PATHSPEC_FILE_NUL(&pathspec_file_nul),\n \tOPT_END(),\n@@ -512,17 +509,6 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n \t\t\tdie(_(\"options '%s' and '%s' cannot be used together\"), \"--pathspec-from-file\", \"--interactive/--patch\");\n \t\texit(interactive_add(argv + 1, prefix, patch_interactive));\n \t}\n-\tif (legacy_stash_p) {\n-\t\tstruct pathspec pathspec;\n-\n-\t\tparse_pathspec(&pathspec, 0,\n-\t\t\tPATHSPEC_PREFER_FULL |\n-\t\t\tPATHSPEC_SYMLINK_LEADING_PATH |\n-\t\t\tPATHSPEC_PREFIX_ORIGIN,\n-\t\t\tprefix, argv);\n-\n-\t\treturn run_add_interactive(NULL, \"--patch=stash\", &pathspec);\n-\t}\n \n \tif (edit_interactive) {\n \t\tif (pathspec_from_file)\n-- \ngitgitgadget\n\n"},{"id":"447143","messageId":"e8e736ee3c28db02c0f390c61a1e0e74f8e4065f.1643321031.git.gitgitgadget@gmail.com","threadId":"57325","inReplyTo":"pull.1133.git.1643321031.gitgitgadget@gmail.com","subject":"[PATCH 3/4] Remove documentation for `stash.useBuiltin`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-01-27T22:03:50Z","receivedAt":"2022-01-27T22:03:59Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn 8a2cd3f5123 (stash: remove the stash.useBuiltin setting, 2020-03-03),\nwe removed the setting, and for a couple of major versions, we still\ndocumented the setting, telling users that it is gone.\n\nWe can now safely remove even the documentation.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Documentation/config/stash.txt | 7 -------\n 1 file changed, 7 deletions(-)\n\ndiff --git a/Documentation/config/stash.txt b/Documentation/config/stash.txt\nindex 9ed775281fb..b9f609ed76b 100644\n--- a/Documentation/config/stash.txt\n+++ b/Documentation/config/stash.txt\n@@ -1,10 +1,3 @@\n-stash.useBuiltin::\n-\tUnused configuration variable.  Used in Git versions 2.22 to\n-\t2.26 as an escape hatch to enable the legacy shellscript\n-\timplementation of stash.  Now the built-in rewrite of it in C\n-\tis always used. Setting this will emit a warning, to alert any\n-\tremaining users that setting this now does nothing.\n-\n stash.showIncludeUntracked::\n \tIf this is set to true, the `git stash show` command will show\n \tthe untracked files of a stash entry.  Defaults to false. See\n-- \ngitgitgadget\n\n"},{"id":"447144","messageId":"047a63173775d309e8d88c60b58d7756be5c0900.1643321031.git.gitgitgadget@gmail.com","threadId":"57325","inReplyTo":"pull.1133.git.1643321031.gitgitgadget@gmail.com","subject":"[PATCH 4/4] stash: stop warning about the obsolete `stash.useBuiltin` config setting","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-01-27T22:03:51Z","receivedAt":"2022-01-27T22:04:01Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn 8a2cd3f5123 (stash: remove the stash.useBuiltin setting, 2020-03-03),\nwe removed support for `stash.useBuiltin`, but left a warning in its\nplace.\n\nAfter almost two years, and several major versions, it is time to remove\neven that warning.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n builtin/stash.c  | 10 ----------\n t/t3903-stash.sh | 15 ---------------\n 2 files changed, 25 deletions(-)\n\ndiff --git a/builtin/stash.c b/builtin/stash.c\nindex 1ef2017c595..25793b5a75a 100644\n--- a/builtin/stash.c\n+++ b/builtin/stash.c\n@@ -788,7 +788,6 @@ static int list_stash(int argc, const char **argv, const char *prefix)\n static int show_stat = 1;\n static int show_patch;\n static int show_include_untracked;\n-static int use_legacy_stash;\n \n static int git_stash_config(const char *var, const char *value, void *cb)\n {\n@@ -804,10 +803,6 @@ static int git_stash_config(const char *var, const char *value, void *cb)\n \t\tshow_include_untracked = git_config_bool(var, value);\n \t\treturn 0;\n \t}\n-\tif (!strcmp(var, \"stash.usebuiltin\")) {\n-\t\tuse_legacy_stash = !git_config_bool(var, value);\n-\t\treturn 0;\n-\t}\n \treturn git_diff_basic_config(var, value, cb);\n }\n \n@@ -1778,11 +1773,6 @@ int cmd_stash(int argc, const char **argv, const char *prefix)\n \n \tgit_config(git_stash_config, NULL);\n \n-\tif (use_legacy_stash ||\n-\t    !git_env_bool(\"GIT_TEST_STASH_USE_BUILTIN\", -1))\n-\t\twarning(_(\"the stash.useBuiltin support has been removed!\\n\"\n-\t\t\t  \"See its entry in 'git help config' for details.\"));\n-\n \targc = parse_options(argc, argv, prefix, options, git_stash_usage,\n \t\t\t     PARSE_OPT_KEEP_UNKNOWN | PARSE_OPT_KEEP_DASHDASH);\n \ndiff --git a/t/t3903-stash.sh b/t/t3903-stash.sh\nindex 686747e55a3..b149e2af441 100755\n--- a/t/t3903-stash.sh\n+++ b/t/t3903-stash.sh\n@@ -1272,7 +1272,6 @@ test_expect_success 'stash works when user.name and user.email are not set' '\n \t>2 &&\n \tgit add 2 &&\n \ttest_config user.useconfigonly true &&\n-\ttest_config stash.usebuiltin true &&\n \t(\n \t\tsane_unset GIT_AUTHOR_NAME &&\n \t\tsane_unset GIT_AUTHOR_EMAIL &&\n@@ -1323,20 +1322,6 @@ test_expect_success 'stash handles skip-worktree entries nicely' '\n \tgit rev-parse --verify refs/stash:A.t\n '\n \n-test_expect_success 'stash -c stash.useBuiltin=false warning ' '\n-\texpected=\"stash.useBuiltin support has been removed\" &&\n-\n-\tgit -c stash.useBuiltin=false stash 2>err &&\n-\ttest_i18ngrep \"$expected\" err &&\n-\tenv GIT_TEST_STASH_USE_BUILTIN=false git stash 2>err &&\n-\ttest_i18ngrep \"$expected\" err &&\n-\n-\tgit -c stash.useBuiltin=true stash 2>err &&\n-\ttest_must_be_empty err &&\n-\tenv GIT_TEST_STASH_USE_BUILTIN=true git stash 2>err &&\n-\ttest_must_be_empty err\n-'\n-\n test_expect_success 'git stash succeeds despite directory/file change' '\n \ttest_create_repo directory_file_switch_v1 &&\n \t(\n-- \ngitgitgadget\n"},{"id":"447169","messageId":"xmqqpmocy60i.fsf@gitster.g","threadId":"57325","inReplyTo":"pull.1133.git.1643321031.gitgitgadget@gmail.com","subject":"Re: [PATCH 0/4] Really retire git-legacy-stash.sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-01-28T01:59:41Z","receivedAt":"2022-01-28T01:59:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> After proving out git stash for a very long time as a shell script, we\n> eventually converted it to a proper built-in, leaving an escape hatch in\n> place to call the scripted version.\n>\n> After another very long time, we removed that escape hatch, leaving behind a\n> warning.\n>\n> Now, almost two years later, let's remove even that warning (and a couple of\n> tidbits that we inadvertently left in the code base).\n\nYay.  We probably could have done this when we disabled the escape\nhatch, but better late than never ;-)\n\n> Johannes Schindelin (4):\n>   git-sh-setup: remove remnant bits referring to `git-legacy-stash`\n>   add: remove support for `git-legacy-stash`\n>   Remove documentation for `stash.useBuiltin`\n>   stash: stop warning about the obsolete `stash.useBuiltin` config\n>     setting\n>\n>  Documentation/config/stash.txt |  7 -------\n>  builtin/add.c                  | 14 --------------\n>  builtin/stash.c                | 10 ----------\n>  git-sh-setup.sh                |  1 -\n>  t/t3903-stash.sh               | 15 ---------------\n>  5 files changed, 47 deletions(-)\n\nIt is surprisingly small removal, but matches the explanation above,\ni.e. the actual old implementation was gone long time ago.\n\nLooking good.\n\nThanks.\n"}]}