Re: [PATCH v2 05/10] split-index.c: dump "link" extension as json
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Jul 3, 2019, 09:08 UTC
- Message-ID
- <20190703090844.GO21574@szeder.dev>
- In-Reply-To
- <20190624130226.17293-6-pclouds@gmail.com>
On Mon, Jun 24, 2019 at 08:02:21PM +0700, Nguyễn Thái Ngọc Duy wrote:
Show 21 quoted lines
> diff --git a/t/t3011-ls-files-json.sh b/t/t3011-ls-files-json.sh > index 082fe8e966..dbb572ce9d 100755 > --- a/t/t3011-ls-files-json.sh > +++ b/t/t3011-ls-files-json.sh > @@ -44,4 +44,18 @@ test_expect_success 'ls-files --json, main entries, UNTR and TREE' ' > compare_json basic > ' > > +test_expect_success 'ls-files --json, split index' ' > + git init split && > + ( > + cd split && > + echo one >one && > + git add one && > + git update-index --split-index && > + echo updated >>one && > + test_must_fail git -c splitIndex.maxPercentChange=100 update-index --refresh && > + cp ../filter.sed . && > + compare_json split-index > + ) > +'
I think this test should 'sane_unset GIT_TEST_SPLIT_INDEX'. Maybe it's not absolutely necessary, because the explicit '--split-index' and '-c splitIndex.maxPercentChange=100' would already fully control when index splitting is performed, eliminating any indeterminism inherent to GIT_TEST_SPLIT_INDEX... but unsetting it would reduce the cognitive load on future readers.
The same might apply to GIT_TEST_FSMONITOR in the following patch, and perhaps even to GIT_TEST_INDEX_THREADS.