From: Derrick Stolee Date: Fri, 12 Dec 2025 15:15:26 +0000 (+0000) Subject: scalar: remove stale config values X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be667e40cbe2975aaf44748f5ee237e0d79359af;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- 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 ` errors out when dir is missing' '