Re: [PATCH 2/2] stash: remove the stash.useBuiltin setting
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Mar 3, 2020, 13:33 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2003031430180.46@tvgsbejvaqbjf.bet>
- In-Reply-To
- <20200302181924.GB1571684@cat>
Hi Thomas,
On Mon, 2 Mar 2020, Thomas Gummerer wrote:
> Remove the stash.useBuiltin setting which was added as an escape hatch > to disable the builtin version of stash first released with Git 2.22.
Great!
Show 21 quoted lines
> diff --git a/builtin/stash.c b/builtin/stash.c
> index f371db270c..5f4bd693df 100644
> --- a/builtin/stash.c
> +++ b/builtin/stash.c
> @@ -1558,22 +1540,18 @@ int cmd_stash(int argc, const char **argv, const char *prefix)
> OPT_END()
> };
>
> - if (!use_builtin_stash()) {
> - const char *path = mkpath("%s/git-legacy-stash",
> - git_exec_path());
> -
> - if (sane_execvp(path, (char **)argv) < 0)
> - die_errno(_("could not exec %s"), path);
> - else
> - BUG("sane_execvp() returned???");
> - }
> -
> prefix = setup_git_directory();
> trace_repo_setup(prefix);
> setup_work_tree();However, this is only needed because we did not change `git.c` at the same time (as I had done for `rebase` in 80dfc9242eb (git: mark cmd_rebase as requiring a worktree, 2019-07-24)). In other words, I think we will also want to address this part of `git.c`:
/*
* NEEDSWORK: Until the builtin stash is thoroughly robust and no
* longer needs redirection to the stash shell script this is kept as
* is, then should be changed to RUN_SETUP | NEED_WORK_TREE
*/
{ "stash", cmd_stash },Other than that, I think your patch pair is good to go!
Ciao, Dscho