Merge branch 'sg/split-index-test'
authorJunio C Hamano <gitster@pobox.com>
Mon, 24 Sep 2018 17:30:53 +0000 (10:30 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Sep 2018 17:30:53 +0000 (10:30 -0700)
Test updates.

* sg/split-index-test:
t0090: disable GIT_TEST_SPLIT_INDEX for the test checking split index
t1700-split-index: drop unnecessary 'grep'

1  2 
t/t0090-cache-tree.sh
diff --combined t/t0090-cache-tree.sh
index 94fcb4a78e661ae793eef54ae98b4821218b1e29,99fe609aadd3ff08c4d01a2b1b209959c7c989ea..504334e552251ed0c1f74536f6fd09ffccda615d
@@@ -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