diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-09-01 16:31:29 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-09-01 16:31:29 -0700 |
commit | 81d0e33a225950b3837953572e4ace283341f762 (patch) | |
tree | edcca9b75eb0ce9fbaace4ebe3c396b9ecdaaf7f /t/t0090-cache-tree.sh | |
parent | 0fb8e2423444e104004062ff34f6f6f594c0ff80 (diff) | |
parent | 475a34451f86d1b954c5da37f04ed044544cf6e4 (diff) | |
download | git-81d0e33a225950b3837953572e4ace283341f762.tar.gz |
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/t0090-cache-tree.sh')
-rwxr-xr-x | t/t0090-cache-tree.sh | 10 |
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 |