All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Phillip Wood <phillip.wood123@gmail.com>,
	"Raymond E. Pasco" <ray@ameretat.dev>,
	phillip.wood@dunelm.org.uk, Thomas Sullivan <tom@msbit.com.au>,
	git@vger.kernel.org
Subject: Re: git add intent-to-add then git add patch no longer allows edit
Date: Tue, 08 Sep 2020 15:00:59 -0700	[thread overview]
Message-ID: <xmqq363sx71g.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.2009082151520.54@tvgsbejvaqbjf.bet> (Johannes Schindelin's message of "Tue, 8 Sep 2020 21:52:13 +0200 (CEST)")

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

>> 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

Thanks, with the proposed log message this time...

-- >8 --
Subject: [PATCH] add -i: use the built-in version when feature.experimental is set

We have had parallel implementations of "add -i/-p" since 2.25 and
have been using them from various codepaths since 2.26 days, but
never made the built-in version the default.

We have found and fixed a handful of corner case bugs in the
built-in version, and it may be a good time to start switching over
the user base from the scripted version to the built-in version.
Let's enable the built-in version for those who opt into the
feature.experimental guinea-pig program to give wider exposure.

Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 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;
-- 
2.28.0-539-g66371d8995


  reply	other threads:[~2020-09-08 22:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-21  4:27 git add intent-to-add then git add patch no longer allows edit Thomas Sullivan
2020-08-21  5:25 ` Raymond E. Pasco
2020-08-21 16:27   ` Junio C Hamano
2020-08-23 16:03     ` Phillip Wood
2020-08-24 16:23       ` Raymond E. Pasco
2020-08-24 17:28         ` Phillip Wood
2020-08-24 21:03           ` Raymond E. Pasco
2020-09-04 10:05             ` Phillip Wood
2020-09-04  6:56               ` Johannes Schindelin
2020-09-06 17:10                 ` Junio C Hamano
2020-09-07 18:00                   ` Phillip Wood
2020-09-08 16:05                     ` Junio C Hamano
2020-09-08 19:52                       ` Johannes Schindelin
2020-09-08 22:00                         ` Junio C Hamano [this message]
2020-09-09  9:40                           ` Phillip Wood
2020-09-05 18:36               ` Raymond E. Pasco

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq363sx71g.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood123@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=ray@ameretat.dev \
    --cc=tom@msbit.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.