From: Junio C Hamano Date: Mon, 24 Sep 2018 17:30:53 +0000 (-0700) Subject: Merge branch 'sg/split-index-test' X-Git-Tag: v2.20.0-rc0~205 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/cff90bdc5c8c8c0b0e3b8a1f32f220f0aba7af55?ds=inline;hp=-c Merge branch 'sg/split-index-test' Test updates. * sg/split-index-test: t0090: disable GIT_TEST_SPLIT_INDEX for the test checking split index t1700-split-index: drop unnecessary 'grep' --- cff90bdc5c8c8c0b0e3b8a1f32f220f0aba7af55 diff --combined t/t0090-cache-tree.sh index 94fcb4a78e,99fe609aad..504334e552 --- a/t/t0090-cache-tree.sh +++ b/t/t0090-cache-tree.sh @@@ -161,24 -161,6 +161,24 @@@ test_expect_success PERL 'commit --inte test_cache_tree ' +test_expect_success PERL 'commit -p with shrinking cache-tree' ' + mkdir -p deep/subdir && + echo content >deep/subdir/file && + git add deep && + git commit -m add && + git rm -r deep && + + before=$(wc -c <.git/index) && + git commit -m delete -p && + after=$(wc -c <.git/index) && + + # double check that the index shrank + test $before -gt $after && + + # and that our index was not corrupted + git fsck +' + test_expect_success 'commit in child dir has cache-tree' ' mkdir dir && >dir/child.t && @@@ -261,13 -243,16 +261,16 @@@ test_expect_success 'no phantom error w ' test_expect_success 'switching trees does not invalidate shared index' ' - git update-index --split-index && - >split && - git add split && - test-tool dump-split-index .git/index | grep -v ^own >before && - git commit -m "as-is" && - test-tool dump-split-index .git/index | grep -v ^own >after && - test_cmp before after + ( + sane_unset GIT_TEST_SPLIT_INDEX && + git update-index --split-index && + >split && + git add split && + test-tool dump-split-index .git/index | grep -v ^own >before && + git commit -m "as-is" && + test-tool dump-split-index .git/index | grep -v ^own >after && + test_cmp before after + ) ' test_done