Skip to content

Commit ce98d61

Browse files
committed
scalar: alphabetize and simplify config
The config values set by Scalar went through an audit in the previous changes, so now reorganize the settings and simplify their purpose. First, alphabetize the config options, except put the platform-specific options at the end. This groups two Windows-specific settings and only one non-Windows setting. Also, this removes the 'overwrite_on_reconfigure' setting for many of these options. That setting made nearly all of these options "required" for scalar enlistments, restricting use for users. Instead, now nearly all options have removed this setting. However, there is one setting that still has this, which is index.skipHash, which was previously being set to _false_ when we actually prefer the value of true. Keep the overwrite here to help Scalar users upgrade to the new version. We may remove that overwrite in the future once we belive that most of the users who have the false value have upgraded to a version that overwrites that to 'true'. Signed-off-by: Derrick Stolee <[email protected]>
1 parent aae027b commit ce98d61

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

scalar.c

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,33 @@ static int have_fsmonitor_support(void)
127127
static int set_recommended_config(int reconfigure)
128128
{
129129
struct scalar_config config[] = {
130-
/* Required */
131-
{ "am.keepCR", "true", 1 },
130+
{ "am.keepCR", "true" },
131+
{ "commitGraph.changedPaths", "true" },
132+
{ "commitGraph.generationVersion", "1" },
133+
{ "core.autoCRLF", "false" },
134+
{ "core.logAllRefUpdates", "true" },
135+
{ "core.safeCRLF", "false" },
136+
{ "credential.https://dev.azure.com.useHttpPath", "true" },
137+
{ "feature.experimental", "false" },
138+
{ "feature.manyFiles", "false" },
139+
{ "fetch.showForcedUpdates", "false" },
140+
{ "fetch.unpackLimit", "1" },
141+
{ "fetch.writeCommitGraph", "false" },
142+
{ "gc.auto", "0" },
143+
{ "gui.GCWarning", "false" },
144+
{ "index.skipHash", "true", 1 /* Fix previous setting. */ },
145+
{ "index.threads", "true"},
146+
{ "index.version", "4" },
147+
{ "merge.renames", "true" },
148+
{ "merge.stat", "false" },
149+
{ "pack.useBitmaps", "false" },
150+
{ "pack.usePathWalk", "true" },
151+
{ "receive.autoGC", "false" },
152+
{ "status.aheadBehind", "false" },
153+
154+
/* platform-specific */
132155
#ifndef WIN32
133-
{ "core.untrackedCache", "true", 1 },
156+
{ "core.untrackedCache", "true" },
134157
#else
135158
/*
136159
* Unfortunately, Scalar's Functional Tests demonstrated
@@ -144,34 +167,11 @@ static int set_recommended_config(int reconfigure)
144167
* Therefore, with a sad heart, we disable this very useful
145168
* feature on Windows.
146169
*/
147-
{ "core.untrackedCache", "false", 1 },
148-
#endif
149-
{ "core.logAllRefUpdates", "true", 1 },
150-
{ "credential.https://dev.azure.com.useHttpPath", "true", 1 },
151-
{ "gc.auto", "0", 1 },
152-
{ "gui.GCWarning", "false", 1 },
153-
{ "index.skipHash", "true", 1 },
154-
{ "index.threads", "true", 1 },
155-
{ "index.version", "4", 1 },
156-
{ "merge.stat", "false", 1 },
157-
{ "merge.renames", "true", 1 },
158-
{ "pack.useBitmaps", "false", 1 },
159-
{ "receive.autoGC", "false", 1 },
160-
{ "feature.manyFiles", "false", 1 },
161-
{ "feature.experimental", "false", 1 },
162-
{ "fetch.unpackLimit", "1", 1 },
163-
{ "fetch.writeCommitGraph", "false", 1 },
164-
#ifdef WIN32
165-
{ "http.sslBackend", "schannel", 1 },
170+
{ "core.untrackedCache", "false" },
171+
172+
/* Other Windows-specific required settings: */
173+
{ "http.sslBackend", "schannel" },
166174
#endif
167-
/* Optional */
168-
{ "status.aheadBehind", "false" },
169-
{ "commitGraph.changedPaths", "true" },
170-
{ "commitGraph.generationVersion", "1" },
171-
{ "core.autoCRLF", "false" },
172-
{ "core.safeCRLF", "false" },
173-
{ "fetch.showForcedUpdates", "false" },
174-
{ "pack.usePathWalk", "true" },
175175
{ NULL, NULL },
176176
};
177177
int i;

0 commit comments

Comments
 (0)