Skip to content

Commit aae027b

Browse files
committed
scalar: remove stale config values
These config values were added in the original Scalar contribution, d0feac4 (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 de3a864 (config: set pack.useSparse=true by default, 2020-03-20) so we don't need it set by Scalar. Signed-off-by: Derrick Stolee <[email protected]>
1 parent 9958aad commit aae027b

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

scalar.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,6 @@ static int set_recommended_config(int reconfigure)
129129
struct scalar_config config[] = {
130130
/* Required */
131131
{ "am.keepCR", "true", 1 },
132-
{ "core.FSCache", "true", 1 },
133-
{ "core.multiPackIndex", "true", 1 },
134-
{ "core.preloadIndex", "true", 1 },
135132
#ifndef WIN32
136133
{ "core.untrackedCache", "true", 1 },
137134
#else
@@ -151,7 +148,6 @@ static int set_recommended_config(int reconfigure)
151148
#endif
152149
{ "core.logAllRefUpdates", "true", 1 },
153150
{ "credential.https://dev.azure.com.useHttpPath", "true", 1 },
154-
{ "credential.validate", "false", 1 }, /* GCM4W-only */
155151
{ "gc.auto", "0", 1 },
156152
{ "gui.GCWarning", "false", 1 },
157153
{ "index.skipHash", "true", 1 },
@@ -160,7 +156,6 @@ static int set_recommended_config(int reconfigure)
160156
{ "merge.stat", "false", 1 },
161157
{ "merge.renames", "true", 1 },
162158
{ "pack.useBitmaps", "false", 1 },
163-
{ "pack.useSparse", "true", 1 },
164159
{ "receive.autoGC", "false", 1 },
165160
{ "feature.manyFiles", "false", 1 },
166161
{ "feature.experimental", "false", 1 },

t/t9210-scalar.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,15 @@ test_expect_success 'scalar clone --no-... opts' '
202202
test_expect_success 'scalar reconfigure' '
203203
git init one/src &&
204204
scalar register one &&
205-
git -C one/src config core.preloadIndex false &&
205+
git -C one/src config unset gui.gcwarning &&
206206
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 &&
209209
rm one/src/cron.txt &&
210210
GIT_TRACE2_EVENT="$(pwd)/reconfigure" scalar reconfigure -a &&
211211
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 &&
214214
test_grep "excludeDecoration = refs/prefetch/\* # set by scalar" one/src/.git/config &&
215215
216216
test_subcommand git maintenance start <reconfigure &&
@@ -234,14 +234,14 @@ test_expect_success 'scalar reconfigure --all with includeIf.onbranch' '
234234
git init $num/src &&
235235
scalar register $num/src &&
236236
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
238238
done &&
239239
240240
scalar reconfigure --all &&
241241
242242
for num in $repos
243243
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
245245
done
246246
'
247247

@@ -252,7 +252,7 @@ test_expect_success 'scalar reconfigure --all with detached HEADs' '
252252
rm -rf $num/src &&
253253
git init $num/src &&
254254
scalar register $num/src &&
255-
git -C $num/src config core.preloadIndex false &&
255+
git -C $num/src config unset gui.gcwarning &&
256256
test_commit -C $num/src initial &&
257257
git -C $num/src switch --detach HEAD || return 1
258258
done &&
@@ -261,7 +261,7 @@ test_expect_success 'scalar reconfigure --all with detached HEADs' '
261261
262262
for num in $repos
263263
do
264-
test true = "$(git -C $num/src config core.preloadIndex)" || return 1
264+
test false = "$(git -C $num/src config gui.gcwarning)" || return 1
265265
done
266266
'
267267

@@ -293,7 +293,7 @@ test_expect_success 'scalar supports -c/-C' '
293293
git init sub &&
294294
scalar -C sub -c status.aheadBehind=bogus register &&
295295
test -z "$(git -C sub config --local status.aheadBehind)" &&
296-
test true = "$(git -C sub config core.preloadIndex)"
296+
test false = "$(git -C sub config gui.gcwarning)"
297297
'
298298

299299
test_expect_success '`scalar [...] <dir>` errors out when dir is missing' '

0 commit comments

Comments
 (0)