Merge branch 'ds/omit-trailing-hash-in-index'
Introduce an optional configuration to allow the trailing hash that protects the index file from bit flipping. * ds/omit-trailing-hash-in-index: features: feature.manyFiles implies fast index writes test-lib-functions: add helper for trailing hash read-cache: add index.skipHash config option hashfile: allow skipping the hash function
This commit is contained in:
@ -23,6 +23,11 @@ feature.manyFiles::
|
||||
working directory. With many files, commands such as `git status` and
|
||||
`git checkout` may be slow and these new defaults improve performance:
|
||||
+
|
||||
* `index.skipHash=true` speeds up index writes by not computing a trailing
|
||||
checksum. Note that this will cause Git versions earlier than 2.13.0 to
|
||||
refuse to parse the index and Git versions earlier than 2.40.0 will report
|
||||
a corrupted index during `git fsck`.
|
||||
+
|
||||
* `index.version=4` enables path-prefix compression in the index.
|
||||
+
|
||||
* `core.untrackedCache=true` enables the untracked cache. This setting assumes
|
||||
|
@ -30,3 +30,14 @@ index.version::
|
||||
Specify the version with which new index files should be
|
||||
initialized. This does not affect existing repositories.
|
||||
If `feature.manyFiles` is enabled, then the default is 4.
|
||||
|
||||
index.skipHash::
|
||||
When enabled, do not compute the trailing hash for the index file.
|
||||
This accelerates Git commands that manipulate the index, such as
|
||||
`git add`, `git commit`, or `git status`. Instead of storing the
|
||||
checksum, write a trailing set of bytes with value zero, indicating
|
||||
that the computation was skipped.
|
||||
+
|
||||
If you enable `index.skipHash`, then Git clients older than 2.13.0 will
|
||||
refuse to parse the index and Git clients older than 2.40.0 will report an
|
||||
error during `git fsck`.
|
||||
|
Reference in New Issue
Block a user