scalar: remove stale config values

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> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Derrick Stolee committed Dec 12, 2025 at 15:15 UTC be667e40cbe2975aaf44748f5ee237e0d79359af
2 files changed +10 -15
scalar.c
-5
@@ -135,9 +135,6 @@ static int set_recommended_config(int reconfigure)
135 struct scalar_config config[] = {
136 /* Required */
137 { "am.keepCR", "true", 1 },
138 - { "core.FSCache", "true", 1 },
139 - { "core.multiPackIndex", "true", 1 },
140 - { "core.preloadIndex", "true", 1 },
138 #ifndef WIN32
139 { "core.untrackedCache", "true", 1 },
140 #else
@@ -157,7 +154,6 @@ static int set_recommended_config(int reconfigure)
154 #endif
155 { "core.logAllRefUpdates", "true", 1 },
156 { "credential.https://dev.azure.com.useHttpPath", "true", 1 },
160 - { "credential.validate", "false", 1 }, /* GCM4W-only */
157 { "gc.auto", "0", 1 },
158 { "gui.GCWarning", "false", 1 },
159 { "index.skipHash", "true", 1 },
@@ -166,7 +162,6 @@ static int set_recommended_config(int reconfigure)
162 { "merge.stat", "false", 1 },
163 { "merge.renames", "true", 1 },
164 { "pack.useBitmaps", "false", 1 },
169 - { "pack.useSparse", "true", 1 },
165 { "receive.autoGC", "false", 1 },
166 { "feature.manyFiles", "false", 1 },
167 { "feature.experimental", "false", 1 },
t/t9210-scalar.sh
+10 -10
@@ -202,15 +202,15 @@ test_expect_success 'scalar clone --no-... opts' '
202 test_expect_success 'scalar reconfigure' '
203 git init one/src &&
204 scalar register one &&
205 - git -C one/src config core.preloadIndex false &&
205 + git -C one/src config unset gui.gcwarning &&
206 scalar reconfigure one &&
207 - test true = "$(git -C one/src config core.preloadIndex)" &&
208 - git -C one/src config core.preloadIndex false &&
207 + test false = "$(git -C one/src config gui.gcwarning)" &&
208 + git -C one/src config unset gui.gcwarning &&
209 rm one/src/cron.txt &&
210 GIT_TRACE2_EVENT="$(pwd)/reconfigure" scalar reconfigure -a &&
211 test_path_is_file one/src/cron.txt &&
212 - test true = "$(git -C one/src config core.preloadIndex)" &&
213 - test_grep "preloadIndex = true # set by scalar" one/src/.git/config &&
212 + test false = "$(git -C one/src config gui.gcwarning)" &&
213 + test_grep "GCWarning = false # set by scalar" one/src/.git/config &&
214 test_grep "excludeDecoration = refs/prefetch/\* # set by scalar" one/src/.git/config &&
215
216 test_subcommand git maintenance start <reconfigure &&
@@ -234,14 +234,14 @@ test_expect_success 'scalar reconfigure --all with includeIf.onbranch' '
234 git init $num/src &&
235 scalar register $num/src &&
236 git -C $num/src config includeif."onbranch:foo".path something &&
237 - git -C $num/src config core.preloadIndex false || return 1
237 + git -C $num/src config unset gui.gcwarning || return 1
238 done &&
239
240 scalar reconfigure --all &&
241
242 for num in $repos
243 do
244 - test true = "$(git -C $num/src config core.preloadIndex)" || return 1
244 + test false = "$(git -C $num/src config gui.gcwarning)" || return 1
245 done
246 '
247
@@ -256,7 +256,7 @@ test_expect_success 'scalar reconfigure --all with detached HEADs' '
256 rm -rf $num/src &&
257 git init $num/src &&
258 scalar register $num/src &&
259 - git -C $num/src config core.preloadIndex false &&
259 + git -C $num/src config unset gui.gcwarning &&
260 test_commit -C $num/src initial &&
261 git -C $num/src switch --detach HEAD || return 1
262 done &&
@@ -265,7 +265,7 @@ test_expect_success 'scalar reconfigure --all with detached HEADs' '
265
266 for num in $repos
267 do
268 - test true = "$(git -C $num/src config core.preloadIndex)" || return 1
268 + test false = "$(git -C $num/src config gui.gcwarning)" || return 1
269 done
270 '
271
@@ -297,7 +297,7 @@ test_expect_success 'scalar supports -c/-C' '
297 git init sub &&
298 scalar -C sub -c status.aheadBehind=bogus register &&
299 test -z "$(git -C sub config --local status.aheadBehind)" &&
300 - test true = "$(git -C sub config core.preloadIndex)"
300 + test false = "$(git -C sub config gui.gcwarning)"
301 '
302
303 test_expect_success '`scalar [...] <dir>` errors out when dir is missing' '