summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-09-03 19:18:02 -0700
committerJunio C Hamano <gitster@pobox.com>2015-09-03 19:18:02 -0700
commit311e5ce2cc06f7bb640be62f487e5b3d14bbb9a0 (patch)
tree26d97cd3ac03658ae61e42bcf267468f8fb0b9bc /t
parent1c820392282466b50f650d484a3560087a7fe686 (diff)
parent475a34451f86d1b954c5da37f04ed044544cf6e4 (diff)
downloadgit-311e5ce2cc06f7bb640be62f487e5b3d14bbb9a0.tar.gz
Merge branch 'dt/commit-preserve-base-index-upon-opportunistic-cache-tree-update' into maint
When re-priming the cache-tree opportunistically while committing the in-core index as-is, we mistakenly invalidated the in-core index too aggressively, causing the experimental split-index code to unnecessarily rewrite the on-disk index file(s). * dt/commit-preserve-base-index-upon-opportunistic-cache-tree-update: commit: don't rewrite shared index unnecessarily
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 601d02d71f..f92dd1f1dc 100755
--- a/t/t0090-cache-tree.sh
+++ b/t/t0090-cache-tree.sh
@@ -218,4 +218,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