From e6a1dd77e1dbfb77cadd27274f211488a348687a Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Mon, 27 Feb 2017 19:00:08 +0100 Subject: read-cache: regenerate shared index if necessary When writing a new split-index and there is a big number of cache entries in the split-index compared to the shared index, it is a good idea to regenerate the shared index. By default when the ratio reaches 20%, we will push back all the entries from the split-index into a new shared index file instead of just creating a new split-index file. The threshold can be configured using the "splitIndex.maxPercentChange" config variable. We need to adjust the existing tests in t1700 by setting "splitIndex.maxPercentChange" to 100 at the beginning of t1700, as the existing tests are assuming that the shared index is regenerated only when `git update-index --split-index` is used. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- t/t1700-split-index.sh | 1 + 1 file changed, 1 insertion(+) (limited to 't') diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh index 1659986d8d..df19b812fd 100755 --- a/t/t1700-split-index.sh +++ b/t/t1700-split-index.sh @@ -8,6 +8,7 @@ test_description='split index mode tests' sane_unset GIT_TEST_SPLIT_INDEX test_expect_success 'enable split index' ' + git config splitIndex.maxPercentChange 100 && git update-index --split-index && test-dump-split-index .git/index >actual && indexversion=$(test-index-version <.git/index) && -- cgit v1.2.3