Merge branch 'mg/work-tree-tests'
[gitweb.git] / t / t0090-cache-tree.sh
index 055cc19000784bdb820e7ae53ba48987ead0367a..adfd4f0b5eea1c0c438647d3d6567479acc5d495 100755 (executable)
@@ -242,4 +242,14 @@ test_expect_success 'no phantom error when switching trees' '
        ! test -s errors
 '
 
+test_expect_success 'switching trees does not invalidate shared index' '
+       git update-index --split-index &&
+       >split &&
+       git add split &&
+       test-dump-split-index .git/index | grep -v ^own >before &&
+       git commit -m "as-is" &&
+       test-dump-split-index .git/index | grep -v ^own >after &&
+       test_cmp before after
+'
+
 test_done