Re: [PATCH 2/2] stash: remove the stash.useBuiltin setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!

Ciao,
Dscho




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux