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

[PATCH v3 3/5] scalar: remove stale config values

From
Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Date
Dec 12, 2025, 15:15 UTC
Message-ID
<85b499a616d7595287499e14358bc76618881e44.1765552528.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.2010.v3.git.1765552528.gitgitgadget@gmail.com>
From: Derrick Stolee <stolee@gmail.com>

These config values were added in the original Scalar contribution, d0feac4e8c (scalar: 'register' sets recommended config and starts maintenance, 2021-12-03), but were never fully checked for validity in the upstream Git project. At the time, Scalar was only intended for the contrib/ directory so did not have as rigorous of an investigation.

Each config option has its own justification for removal:
* core.preloadIndex: This value is true by default, now. Removing this
  causes some changes required to the tests that checked this config
  value. Use gui.gcwarning=false instead.
* core.fscache: This config does not exist in the core Git project, but
  is instead a config option for a Git for Windows feature.
* core.multiPackIndex: This config value is now enabled by default, so
  does not need to be called out specifically. It was originally
  included to make sure the background maintenance that created
  multi-pack-indexes would result in the expected performance
  improvements.
* credential.validate: This option is not something specific to Git but
  instead an older version of Git Credential Manager for Windows. That
  software was replaced several years ago by the cross-platform Git
  Credential Manger so this option is no longer needed to help users who
  were on that older software.
* pack.useSparse=true: This value is now Git's default as of de3a864114
  (config: set pack.useSparse=true by default, 2020-03-20) so we don't
  need it set by Scalar.
Signed-off-by: Derrick Stolee <stolee@gmail.com>
---
 scalar.c          |  5 -----
 t/t9210-scalar.sh | 20 ++++++++++----------
 2 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/scalar.c b/scalar.c
index 55b8542770..aeebea41fa 100644
--- a/scalar.c
+++ b/scalar.c
@@ -135,9 +135,6 @@ static int set_recommended_config(int reconfigure)
 	struct scalar_config config[] = {
 		/* Required */
 		{ "am.keepCR", "true", 1 },
-		{ "core.FSCache", "true", 1 },
-		{ "core.multiPackIndex", "true", 1 },
-		{ "core.preloadIndex", "true", 1 },
 #ifndef WIN32
 		{ "core.untrackedCache", "true", 1 },
 #else
@@ -157,7 +154,6 @@ static int set_recommended_config(int reconfigure)
 #endif
 		{ "core.logAllRefUpdates", "true", 1 },
 		{ "credential.https://dev.azure.com.useHttpPath", "true", 1 },
-		{ "credential.validate", "false", 1 }, /* GCM4W-only */
 		{ "gc.auto", "0", 1 },
 		{ "gui.GCWarning", "false", 1 },
 		{ "index.skipHash", "true", 1 },
@@ -166,7 +162,6 @@ static int set_recommended_config(int reconfigure)
 		{ "merge.stat", "false", 1 },
 		{ "merge.renames", "true", 1 },
 		{ "pack.useBitmaps", "false", 1 },
-		{ "pack.useSparse", "true", 1 },
 		{ "receive.autoGC", "false", 1 },
 		{ "feature.manyFiles", "false", 1 },
 		{ "feature.experimental", "false", 1 },
diff --git a/t/t9210-scalar.sh b/t/t9210-scalar.sh
index 923c243c13..009437a5f3 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 core.preloadIndex false &&
+	git -C one/src config unset gui.gcwarning &&
 	scalar reconfigure one &&
-	test true = "$(git -C one/src config core.preloadIndex)" &&
-	git -C one/src config core.preloadIndex false &&
+	test false = "$(git -C one/src config gui.gcwarning)" &&
+	git -C one/src config unset gui.gcwarning &&
 	rm one/src/cron.txt &&
 	GIT_TRACE2_EVENT="$(pwd)/reconfigure" scalar reconfigure -a &&
 	test_path_is_file one/src/cron.txt &&
-	test true = "$(git -C one/src config core.preloadIndex)" &&
-	test_grep "preloadIndex = true # set by scalar" one/src/.git/config &&
+	test false = "$(git -C one/src config gui.gcwarning)" &&
+	test_grep "GCWarning = false # 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 core.preloadIndex false || return 1
+		git -C $num/src config unset gui.gcwarning || return 1
 	done &&
 
 	scalar reconfigure --all &&
 
 	for num in $repos
 	do
-		test true = "$(git -C $num/src config core.preloadIndex)" || return 1
+		test false = "$(git -C $num/src config gui.gcwarning)" || 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 core.preloadIndex false &&
+		git -C $num/src config unset gui.gcwarning &&
 		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 true = "$(git -C $num/src config core.preloadIndex)" || return 1
+		test false = "$(git -C $num/src config gui.gcwarning)" || 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 true = "$(git -C sub config core.preloadIndex)"
+	test false = "$(git -C sub config gui.gcwarning)"
 '
 
 test_expect_success '`scalar [...] <dir>` errors out when dir is missing' '
-- 
gitgitgadget
Previous: Derrick Stolee via GitGitGadgetNext: Derrick Stolee via GitGitGadget
Message 42 of 48 in “Audit and document Scalar config”
  1. 0/5 Audit and document Scalar configDerrick Stolee via GitGitGadget, Nov 26, 2025
  2. 1/5 scalar: annotate config file with "set by scalar"Derrick Stolee via GitGitGadget, Nov 26, 2025
  3. Junio C HamanoNov 26, 2025
  4. Patrick SteinhardtDec 1, 2025
  5. 2/5 scalar: use index.skipHash=true for performanceDerrick Stolee via GitGitGadget, Nov 26, 2025
  6. Junio C HamanoNov 26, 2025
  7. Derrick StoleeNov 30, 2025
  8. 3/5 scalar: remove stale config valuesDerrick Stolee via GitGitGadget, Nov 26, 2025
  9. Junio C HamanoNov 27, 2025
  10. 4/5 scalar: alphabetize and simplify configDerrick Stolee via GitGitGadget, Nov 26, 2025
  11. Patrick SteinhardtDec 1, 2025
  12. Derrick StoleeDec 1, 2025
  13. 5/5 scalar: document config settingsDerrick Stolee via GitGitGadget, Nov 26, 2025
  14. Junio C HamanoNov 27, 2025
  15. Derrick StoleeNov 30, 2025
  16. Patrick SteinhardtDec 1, 2025
  17. Derrick StoleeDec 1, 2025
  18. Johannes SchindelinDec 1, 2025
  19. 0/5 Audit and document Scalar configDerrick Stolee via GitGitGadget, Dec 1, 2025
  20. 1/5 scalar: annotate config file with "set by scalar"Derrick Stolee via GitGitGadget, Dec 1, 2025
  21. Patrick SteinhardtDec 2, 2025
  22. 2/5 scalar: use index.skipHash=true for performanceDerrick Stolee via GitGitGadget, Dec 1, 2025
  23. 3/5 scalar: remove stale config valuesDerrick Stolee via GitGitGadget, Dec 1, 2025
  24. Matthew HughesDec 1, 2025
  25. Patrick SteinhardtDec 2, 2025
  26. Matthew HughesDec 2, 2025
  27. Patrick SteinhardtDec 2, 2025
  28. Junio C HamanoDec 7, 2025
  29. Patrick SteinhardtDec 8, 2025
  30. Derrick StoleeDec 12, 2025
  31. 4/5 scalar: alphabetize and simplify configDerrick Stolee via GitGitGadget, Dec 1, 2025
  32. 5/5 scalar: document config settingsDerrick Stolee via GitGitGadget, Dec 1, 2025
  33. Matthew HughesDec 1, 2025
  34. Patrick SteinhardtDec 2, 2025
  35. Henrique FerreiroDec 11, 2025
  36. Derrick StoleeDec 12, 2025
  37. Henrique FerreiroDec 15, 2025
  38. Junio C HamanoDec 2, 2025
  39. 0/5 Audit and document Scalar configDerrick Stolee via GitGitGadget, Dec 12, 2025
  40. 1/5 scalar: annotate config file with "set by scalar"Derrick Stolee via GitGitGadget, Dec 12, 2025
  41. 2/5 scalar: use index.skipHash=true for performanceDerrick Stolee via GitGitGadget, Dec 12, 2025
  42. 3/5 scalar: remove stale config valuesDerrick Stolee via GitGitGadget, Dec 12, 2025
  43. 4/5 scalar: alphabetize and simplify configDerrick Stolee via GitGitGadget, Dec 12, 2025
  44. 5/5 scalar: document config settingsDerrick Stolee via GitGitGadget, Dec 12, 2025
  45. Henrique FerreiroDec 15, 2025
  46. Junio C HamanoDec 12, 2025
  47. Derrick StoleeDec 15, 2025
  48. Junio C HamanoDec 16, 2025

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.