Skip to content

Commit f38ead9

Browse files
committed
scalar: document config settings
Add user-facing documentation that justifies the values being set by 'scalar clone', 'scalar register', and 'scalar reconfigure'. Signed-off-by: Derrick Stolee <[email protected]>
1 parent ce98d61 commit f38ead9

File tree

1 file changed

+158
-0
lines changed

1 file changed

+158
-0
lines changed

Documentation/scalar.adoc

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,164 @@ delete <enlistment>::
197197
This subcommand lets you delete an existing Scalar enlistment from your
198198
local file system, unregistering the repository.
199199

200+
REQUIRED AND RECOMMENDED CONFIG
201+
-------------------------------
202+
203+
As part of both `scalar clone` and `scalar register`, certain Git config
204+
values are set to optimize for large repositories or cross-platform support.
205+
These options are updated in new Git versions according to the best known
206+
advice for large repositories, and users can get the latest recommendations
207+
by running `scalar reconfigure [--all]`.
208+
209+
This section lists justifications for the config values that are set in the
210+
latest version.
211+
212+
am.keepCR=true::
213+
This setting is important for cross-platform development across Windows
214+
and non-Windows platforms and keeping carriage return (`\r`) characters
215+
in certain workflows.
216+
217+
commitGraph.changedPaths=true::
218+
This setting helps the background maintenance steps that compute the
219+
serialized commit-graph to also store changed-path Bloom filters. This
220+
accelerates file history commands and allows users to automatically
221+
benefit without running a foreground command.
222+
223+
commitGraph.generationVersion=1::
224+
While the preferred version is 2 for performance reasons, existing users
225+
that had version 1 by default will need special care in upgrading to
226+
version 2. This is likely to change in the future as the upgrade story
227+
is solidifies.
228+
229+
core.autoCRLF=false::
230+
This removes the transformation of worktree files to add CRLF line
231+
endings when only LF line endings exist. This is removed for performance
232+
reasons. Repositories that use tools that care about CRLF line endings
233+
should commit the necessary files with those line endings instead.
234+
235+
core.logAllRefUpdates=true::
236+
This enables the reflog on all branches. While this is a performance
237+
cost for large repositories, it is frequently an important data source
238+
for users to get out of bad situations or to seek support from experts.
239+
240+
core.safeCRLF=false::
241+
Similar to `core.autoCRLF=false`, this disables checks around whether
242+
the CRLF conversion is reversible. This is a performance improvement,
243+
but can be dangerous if `core.autoCRLF` is reenabled by the user.
244+
245+
credential.https://dev.azure.com.useHttpPath=true::
246+
This setting enables the `credential.useHttpPath` feature only for web
247+
URLs for Azure DevOps. This is important for users interacting with that
248+
service using multiple organizations and thus multiple credential
249+
tokens.
250+
251+
feature.experimental=false::
252+
This disables the "experimental" optimizations grouped under this
253+
feature config. The expectation is that all valuable optimizations are
254+
also set explicitly by Scalar config, and any differences are
255+
intentional. Notable differences include several bitmap-related config
256+
options which are disabled for client-focused Scalar repos.
257+
258+
feature.manyFiles=false::
259+
This disables the "many files" optimizations grouped under this feature
260+
config. The expectation is that all valuable optimizations are also set
261+
explicitly by Scalar config, and any differences are intentional.
262+
263+
fetch.showForcedUpdates=false::
264+
This disables the check at the end of `git fetch` that notifies the user
265+
if the ref update was a forced update (one where the previous position
266+
is not reachable from the latest position). This check can be very
267+
expensive in large repositories, so is disabled and replaced with an
268+
advice message. Set `advice.fetchShowForcedUpdates=false` to disable
269+
this advice message.
270+
271+
fetch.unpackLimit=1::
272+
This setting prevents Git from unpacking packfiles into loose objects
273+
as they are downloaded from the server. This feature was intended as a
274+
way to prevent performance issues from too many packfiles, but Scalar
275+
uses background maintenance to group packfiles and cover them with a
276+
multi-pack-index, removing this issue.
277+
278+
fetch.writeCommitGraph=false::
279+
This config setting was created to help users automatically udpate their
280+
commit-graph files as they perform fetches. However, this takes time
281+
from foreground fetches and pulls and Scalar uses background maintenance
282+
for this function instead.
283+
284+
gc.auto=0::
285+
This disables automatic garbage collection, since Scalar uses background
286+
maintenance to keep the repository data in good shape.
287+
288+
gui.GCWarning=false::
289+
Since Scalar disables garbage collection by setting `gc.auto=0`, the
290+
`git-gui` tool may start to warn about this setting. Disable this
291+
warning as Scalar's background maintenance configuration makes the
292+
warning irrelevant.
293+
294+
index.skipHash=true::
295+
Disable computing the hash of the index contents as it is being written.
296+
This assists with performance, especially for large index files.
297+
298+
index.threads=true::
299+
This tells Git to automatically detect how many threads it should use
300+
when reading the index in parallel due to the `core.preloadIndex=true`
301+
setting.
302+
303+
index.version=4::
304+
This index version adds compression to the path names, reducing the size
305+
of the index in a significant way for large repos. This is an important
306+
performance boost.
307+
308+
merge.renames=true::
309+
When computing merges in large repos, it is particularly important to
310+
detect renames to maximize the potential for a result that will validate
311+
correctly. Users performing merges locally are more likely to be doing
312+
so because a server-side merge (via pull request or similar) resulted in
313+
conflicts. While this is the default setting, it is set specifically to
314+
override a potential change to `diff.renames` which a user may set for
315+
performance reasons.
316+
317+
merge.stat=false::
318+
This disables a diff output after computing a merge. This improves
319+
performance of `git merge` for large repos while reducing noisy output.
320+
321+
pack.useBitmaps=false::
322+
This disables the use of `.bitmap` files attached to packfiles. Bitmap
323+
files are optimized for server-side use, not client-side use. Scalar
324+
disables this to avoid some performance issues that can occur if a user
325+
accidentally creates `.bitmap` files.
326+
327+
pack.usePathWalk=true::
328+
This enables the `--path-walk` option to `git pack-objects` by default.
329+
This can accelerate the computation and compression of packfiles created
330+
by `git push` and other repack operations.
331+
332+
receive.autoGC=false::
333+
Similar to `gc.auto`, this setting is disabled in preference of
334+
background maintenance.
335+
336+
status.aheadBehind=false::
337+
This disables the ahead/behind calculation that would normally happen
338+
during a `git status` command. This information is frequently ignored by
339+
users but can be expensive to calculate in large repos that receive
340+
thousands of commits per day. The calculation is replaced with an advice
341+
message that can be disabled by disabling the `advice.statusAheadBehind`
342+
config.
343+
344+
The following settings are different based on which platform is in use:
345+
346+
core.untrackedCache=(true|false)::
347+
The untracked cache feature is important for performance benefits on
348+
large repositories, but has demonstrated some bugs on Windows
349+
filesystems. Thus, this is set for other platforms but disabled on
350+
Windows.
351+
352+
http.sslBackend=schannel::
353+
On Windows, the `openssl` backend has some issues with certain types of
354+
remote providers and certificate types. Override the default setting to
355+
avoid these common problems.
356+
357+
200358
SEE ALSO
201359
--------
202360
linkgit:git-clone[1], linkgit:git-maintenance[1].

0 commit comments

Comments
 (0)