Re: git add intent-to-add then git add patch no longer allows edit

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

 



Hi Junio,

On Tue, 8 Sep 2020, Junio C Hamano wrote:

> Phillip Wood <phillip.wood123@xxxxxxxxx> writes:
>
> >>  If we do not flip the
> >> "use the built-in variant" for those with feature.experimental we
> >> really should do so to widen the canarying population immediately.
> >
> > That's a good idea
>
> Like this?  If the more specific one is specifically set, we do not
> look at experimental bit, but otherwise we use the built-in version.

Looks fine to me,
Dscho

>
>  builtin/add.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/builtin/add.c b/builtin/add.c
> index b36a99eb7c..26b6ced09e 100644
> --- a/builtin/add.c
> +++ b/builtin/add.c
> @@ -192,9 +192,15 @@ int run_add_interactive(const char *revision, const char *patch_mode,
>  	int use_builtin_add_i =
>  		git_env_bool("GIT_TEST_ADD_I_USE_BUILTIN", -1);
>
> -	if (use_builtin_add_i < 0)
> -		git_config_get_bool("add.interactive.usebuiltin",
> -				    &use_builtin_add_i);
> +	if (use_builtin_add_i < 0) {
> +		int experimental;
> +		if (!git_config_get_bool("add.interactive.usebuiltin",
> +					 &use_builtin_add_i))
> +			; /* ok */
> +		else if (!git_config_get_bool("feature.experimental", &experimental) &&
> +			 experimental)
> +			use_builtin_add_i = 1;
> +	}
>
>  	if (use_builtin_add_i == 1) {
>  		enum add_p_mode mode;
>




[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