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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 8, 2020, 16:05 UTC
Message-ID
<xmqqsgbsz22t.fsf@gitster.c.googlers.com>
In-Reply-To
<a8099cb4-97e0-5596-72a1-10402762015b@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 5 quoted lines
>>  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.

 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;
Previous: Phillip WoodNext: Johannes Schindelin
Message 12 of 16 in “git add intent-to-add then git add patch no longer allows edit”
  1. Thomas SullivanAug 21, 2020
  2. Raymond E. PascoAug 21, 2020
  3. Junio C HamanoAug 21, 2020
  4. Phillip WoodAug 23, 2020
  5. Raymond E. PascoAug 24, 2020
  6. Phillip WoodAug 24, 2020
  7. Raymond E. PascoAug 24, 2020
  8. Phillip WoodSep 4, 2020
  9. Johannes SchindelinSep 4, 2020
  10. Junio C HamanoSep 6, 2020
  11. Phillip WoodSep 7, 2020
  12. Junio C HamanoSep 8, 2020
  13. Johannes SchindelinSep 8, 2020
  14. Junio C HamanoSep 8, 2020
  15. Phillip WoodSep 9, 2020
  16. Raymond E. PascoSep 5, 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.