Re: [PATCH 2/2] stash: remove the stash.useBuiltin setting
- From
Thomas Gummerer <t.gummerer@gmail.com>
- Date
- Mar 3, 2020, 17:36 UTC
- Message-ID
- <20200303173625.GC1571684@cat>
- In-Reply-To
- <nycvar.QRO.7.76.6.2003031430180.46@tvgsbejvaqbjf.bet>
On 03/03, Johannes Schindelin wrote:
Show 44 quoted lines
> 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!
>
> > 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!Ah I had completely missed that, thanks for catching it! Will send the updated patches shortly.