[PATCH 3/5] scalar: remove stale config values
From: Derrick Stolee via GitGitGadget <hidden>
Date: 2025-11-26 22:18:44
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Derrick Stolee <redacted> 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 <redacted> --- scalar.c | 5 ----- t/t9210-scalar.sh | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/scalar.c b/scalar.c
index 75fd292be7..fb595fab3a 100644
--- a/scalar.c
+++ b/scalar.c@@ -129,9 +129,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
@@ -151,7 +148,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 },
@@ -160,7 +156,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 91d5964b73..63224d2062 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 '
@@ -257,7 +257,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 &&
@@ -266,7 +266,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 '
@@ -298,7 +298,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