Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerrick Stolee <derrickstolee@github.com>2023-01-06 19:31:56 +0300
committerJunio C Hamano <gitster@pobox.com>2023-01-07 01:46:14 +0300
commit17194b195d5db1cfd19af57e817c29bd3fa75c02 (patch)
tree848d5f854a3150f031fdb5d3b98466da09aaac8c /t/t1600-index.sh
parentda9acde14ed4ea621b5db844630c1f620f24e110 (diff)
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-xt/t1600-index.sh11
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 &&