Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-09-02 02:31:29 +0300
committerJunio C Hamano <gitster@pobox.com>2015-09-02 02:31:29 +0300
commit81d0e33a225950b3837953572e4ace283341f762 (patch)
treeedcca9b75eb0ce9fbaace4ebe3c396b9ecdaaf7f /t
parent0fb8e2423444e104004062ff34f6f6f594c0ff80 (diff)
parent475a34451f86d1b954c5da37f04ed044544cf6e4 (diff)
Merge branch 'dt/commit-preserve-base-index-upon-opportunistic-cache-tree-update'
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 055cc19000..adfd4f0b5e 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