summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t0090-cache-tree.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t0090-cache-tree.sh b/t/t0090-cache-tree.sh
index 055cc19..adfd4f0 100755
--- a/t/t0090-cache-tree.sh
+++ b/t/t0090-cache-tree.sh
@@ -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