From: Christian Couder Date: Sat, 29 Oct 2016 22:58:45 GMT Subject: Re: [PATCH v1 10/19] read-cache: regenerate shared index if necessary Message-ID: In-Reply-To: On Tue, Oct 25, 2016 at 12:16 PM, Duy Nguyen wrote: > On Sun, Oct 23, 2016 at 4:26 PM, Christian Couder > wrote: >> @@ -2233,7 +2263,8 @@ int write_locked_index(struct index_state *istate, struct lock_file *lock, >> if ((v & 15) < 6) >> istate->cache_changed |= SPLIT_INDEX_ORDERED; >> } >> - if (istate->cache_changed & SPLIT_INDEX_ORDERED) { >> + if (istate->cache_changed & SPLIT_INDEX_ORDERED || >> + too_many_not_shared_entries(istate)) { > > It's probably safer to keep this piece unchanged and add this > somewhere before it > > if (too_many_not_shared_entries(istate)) > istate->cache_changed |= SPLIT_INDEX_ORDERED; > > We could keep cache_changed consistent until the end this way. Ok, it will be in the next version. >> test_expect_success 'enable split index' ' >> + git config splitIndex.maxPercentChange 100 && > > An alternative name might be splitThreshold. I don't know, maybe > maxPercentChange is better. I think it is important to say that it is a percent in the name, so I prefer maxPercentChange. Thanks, Christian.