Subject: [PATCH 4/4] scalar: remove obsolete gui.GCWarning setting

From: "Wolfgang Faust" <[email-masked]>
Date: Thu, 05 Mar 2026 21:32:54 -0800

The git-gui tool now uses automatic maintenance and no longer uses this
config to prompt the user for manual garbage collection, so scalar no
longer needs to maintain this value.

The tests appear to have selected this setting as a sentinel, so change
them to use the similar gc.auto setting instead.

Signed-off-by: Wolfgang Faust <[email-masked]>
---
I assume this one needs to be CC'ed to the scalar maintainers, but I'll
do that once the rest of the series settles.

 Documentation/scalar.adoc |  6 ------
 scalar.c                  |  1 -
 t/t9210-scalar.sh         | 20 ++++++++++----------
 3 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/Documentation/scalar.adoc b/Documentation/scalar.adoc
index 5252fb134a..4dbe976b65 100644
--- a/Documentation/scalar.adoc
+++ b/Documentation/scalar.adoc
@@ -285,12 +285,6 @@ gc.auto=0::
 	This disables automatic garbage collection, since Scalar uses background
 	maintenance to keep the repository data in good shape.
 
-gui.GCWarning=false::
-	Since Scalar disables garbage collection by setting `gc.auto=0`, the
-	`git-gui` tool may start to warn about this setting. Disable this
-	warning as Scalar's background maintenance configuration makes the
-	warning irrelevant.
-
 index.skipHash=true::
 	Disable computing the hash of the index contents as it is being written.
 	This assists with performance, especially for large index files.
diff --git a/scalar.c b/scalar.c
index 4efb6ac36d..0a6359ec6d 100644
--- a/scalar.c
+++ b/scalar.c
@@ -150,7 +150,6 @@ static int set_recommended_config(int reconfigure)
 		{ "fetch.unpackLimit", "1" },
 		{ "fetch.writeCommitGraph", "false" },
 		{ "gc.auto", "0" },
-		{ "gui.GCWarning", "false" },
 		{ "index.skipHash", "true", 1 /* Fix previous setting. */ },
 		{ "index.threads", "true"},
 		{ "index.version", "4" },
diff --git a/t/t9210-scalar.sh b/t/t9210-scalar.sh
index 009437a5f3..55f73939bb 100755
--- a/t/t9210-scalar.sh
+++ b/t/t9210-scalar.sh
@@ -202,15 +202,15 @@ test_expect_success 'scalar clone --no-... opts' '
 test_expect_success 'scalar reconfigure' '
 	git init one/src &&
 	scalar register one &&
-	git -C one/src config unset gui.gcwarning &&
+	git -C one/src config unset gc.auto &&
 	scalar reconfigure one &&
-	test false = "$(git -C one/src config gui.gcwarning)" &&
-	git -C one/src config unset gui.gcwarning &&
+	test 0 = "$(git -C one/src config gc.auto)" &&
+	git -C one/src config unset gc.auto &&
 	rm one/src/cron.txt &&
 	GIT_TRACE2_EVENT="$(pwd)/reconfigure" scalar reconfigure -a &&
 	test_path_is_file one/src/cron.txt &&
-	test false = "$(git -C one/src config gui.gcwarning)" &&
-	test_grep "GCWarning = false # set by scalar" one/src/.git/config &&
+	test 0 = "$(git -C one/src config gc.auto)" &&
+	test_grep "auto = 0 # set by scalar" one/src/.git/config &&
 	test_grep "excludeDecoration = refs/prefetch/\* # set by scalar" one/src/.git/config &&
 
 	test_subcommand git maintenance start <reconfigure &&
@@ -234,14 +234,14 @@ test_expect_success 'scalar reconfigure --all with includeIf.onbranch' '
 		git init $num/src &&
 		scalar register $num/src &&
 		git -C $num/src config includeif."onbranch:foo".path something &&
-		git -C $num/src config unset gui.gcwarning || return 1
+		git -C $num/src config unset gc.auto || return 1
 	done &&
 
 	scalar reconfigure --all &&
 
 	for num in $repos
 	do
-		test false = "$(git -C $num/src config gui.gcwarning)" || return 1
+		test 0 = "$(git -C $num/src config gc.auto)" || return 1
 	done
 '
 
@@ -256,7 +256,7 @@ test_expect_success 'scalar reconfigure --all with detached HEADs' '
 		rm -rf $num/src &&
 		git init $num/src &&
 		scalar register $num/src &&
-		git -C $num/src config unset gui.gcwarning &&
+		git -C $num/src config unset gc.auto &&
 		test_commit -C $num/src initial &&
 		git -C $num/src switch --detach HEAD || return 1
 	done &&
@@ -265,7 +265,7 @@ test_expect_success 'scalar reconfigure --all with detached HEADs' '
 
 	for num in $repos
 	do
-		test false = "$(git -C $num/src config gui.gcwarning)" || return 1
+		test 0 = "$(git -C $num/src config gc.auto)" || return 1
 	done
 '
 
@@ -297,7 +297,7 @@ test_expect_success 'scalar supports -c/-C' '
 	git init sub &&
 	scalar -C sub -c status.aheadBehind=bogus register &&
 	test -z "$(git -C sub config --local status.aheadBehind)" &&
-	test false = "$(git -C sub config gui.gcwarning)"
+	test 0 = "$(git -C sub config gc.auto)"
 '
 
 test_expect_success '`scalar [...] <dir>` errors out when dir is missing' '
-- 
2.52.0