diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-01-16 12:07:47 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-01-16 12:07:47 -0800 |
commit | ffd923868574a004ec20a80dbc3b813da9a93b08 (patch) | |
tree | fb80c1309a6cd0528d7dcc77d20a18451ef278fc /Documentation/config | |
parent | ab85a7de6d332b4b21f94937e6600a14c270422c (diff) | |
parent | 17194b195d5db1cfd19af57e817c29bd3fa75c02 (diff) | |
download | git-ffd923868574a004ec20a80dbc3b813da9a93b08.tar.gz |
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
Diffstat (limited to 'Documentation/config')
-rw-r--r-- | Documentation/config/feature.txt | 5 | ||||
-rw-r--r-- | Documentation/config/index.txt | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/Documentation/config/feature.txt b/Documentation/config/feature.txt index 95975e5091..e52bc6b858 100644 --- a/Documentation/config/feature.txt +++ b/Documentation/config/feature.txt @@ -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 diff --git a/Documentation/config/index.txt b/Documentation/config/index.txt index 75f3a2d105..23c7985eb4 100644 --- a/Documentation/config/index.txt +++ b/Documentation/config/index.txt @@ -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`. |