git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Elijah NewrenNext: Junio C Hamano
Message 8 of 21 in “Git Rebase: test failing with GIT_TEST_STASH_USE_BUILTIN=false”
  1. Son Luong NgocFeb 24, 2020
  2. Junio C HamanoFeb 25, 2020
  3. 1/2 stash: get git_stash_config at the top levelThomas Gummerer, Mar 2, 2020
  4. 2/2 stash: remove the stash.useBuiltin settingThomas Gummerer, Mar 2, 2020
  5. Junio C HamanoMar 2, 2020
  6. non-regression bug in 'git merge' (really, xdiff/xmerge, I think)Junio C Hamano, Mar 2, 2020
  7. Elijah NewrenMar 6, 2020
  8. Johannes SchindelinMar 3, 2020
  9. Junio C HamanoMar 3, 2020
  10. Thomas GummererMar 3, 2020
  11. Johannes SchindelinMar 4, 2020
  12. 1/2 stash: get git_stash_config at the top levelThomas Gummerer, Mar 3, 2020
  13. 2/2 stash: remove the stash.useBuiltin settingThomas Gummerer, Mar 3, 2020
  14. Junio C HamanoMar 3, 2020
  15. Thomas GummererMar 4, 2020
  16. Junio C HamanoMar 4, 2020
  17. Thomas GummererMar 5, 2020
  18. Son Luong NgocMar 1, 2020
  19. Son Luong NgocMar 1, 2020
  20. Johannes SchindelinMar 6, 2020
  21. Thomas GummererMar 6, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.