diff options
author | Derrick Stolee <derrickstolee@github.com> | 2023-01-06 17:31:56 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-01-06 23:46:14 +0100 |
commit | 17194b195d5db1cfd19af57e817c29bd3fa75c02 (patch) | |
tree | 848d5f854a3150f031fdb5d3b98466da09aaac8c /t/t1600-index.sh | |
parent | test-lib-functions: add helper for trailing hash (diff) | |
download | git-17194b195d5db1cfd19af57e817c29bd3fa75c02.tar.xz git-17194b195d5db1cfd19af57e817c29bd3fa75c02.zip |
features: feature.manyFiles implies fast index writes
The recent addition of the index.skipHash config option allows index
writes to speed up by skipping the hash computation for the trailing
checksum. This is particularly critical for repositories with many files
at HEAD, so add this config option to two cases where users in that
scenario may opt-in to such behavior:
1. The feature.manyFiles config option enables some options that are
helpful for repositories with many files at HEAD.
2. 'scalar register' and 'scalar reconfigure' set config options that
optimize for large repositories.
In both of these cases, set index.skipHash=true to gain this
speedup. Add tests that demonstrate the proper way that
index.skipHash=true can override feature.manyFiles=true.
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1600-index.sh')
-rwxr-xr-x | t/t1600-index.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t1600-index.sh b/t/t1600-index.sh index 2f792bb8ff..0ebbae1305 100755 --- a/t/t1600-index.sh +++ b/t/t1600-index.sh @@ -73,6 +73,17 @@ test_expect_success 'index.skipHash config option' ' test_cmp expect hash && git fsck && + rm -f .git/index && + git -c feature.manyFiles=true add a && + test_trailing_hash .git/index >hash && + cmp expect hash && + + rm -f .git/index && + git -c feature.manyFiles=true \ + -c index.skipHash=false add a && + test_trailing_hash .git/index >hash && + ! cmp expect hash && + test_commit start && git -c protocol.file.allow=always submodule add ./ sub && git config index.skipHash false && |