summaryrefslogtreecommitdiff
path: root/t/t0090-cache-tree.sh
diff options
context:
space:
mode:
authorLibravatar Brian Degenhardt <bmd@bmdhacks.com>2015-07-28 15:30:40 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-07-28 13:43:13 -0700
commit52fca2184df8398f0ba212cd6a0ec1fb123b7473 (patch)
treeeb783ea1b263c7105a4b1798e4f4bca68bb0fd99 /t/t0090-cache-tree.sh
parentGit 2.3.8 (diff)
downloadtgif-52fca2184df8398f0ba212cd6a0ec1fb123b7473.tar.xz
unpack-trees: populate cache-tree on successful merge
When we unpack trees into an existing index, we discard the old index and replace it with the new, merged index. Ensure that this index has its cache-tree populated. This will make subsequent git status and commit commands faster. Signed-off-by: Brian Degenhardt <bmd@bmdhacks.com> Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0090-cache-tree.sh')
-rwxr-xr-xt/t0090-cache-tree.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t0090-cache-tree.sh b/t/t0090-cache-tree.sh
index 601d02d71f..055cc19000 100755
--- a/t/t0090-cache-tree.sh
+++ b/t/t0090-cache-tree.sh
@@ -199,6 +199,30 @@ test_expect_success 'checkout -B gives cache-tree' '
test_cache_tree
'
+test_expect_success 'merge --ff-only maintains cache-tree' '
+ git checkout current &&
+ git checkout -b changes &&
+ test_commit llamas &&
+ test_commit pachyderm &&
+ test_cache_tree &&
+ git checkout current &&
+ test_cache_tree &&
+ git merge --ff-only changes &&
+ test_cache_tree
+'
+
+test_expect_success 'merge maintains cache-tree' '
+ git checkout current &&
+ git checkout -b changes2 &&
+ test_commit alpacas &&
+ test_cache_tree &&
+ git checkout current &&
+ test_commit struthio &&
+ test_cache_tree &&
+ git merge changes2 &&
+ test_cache_tree
+'
+
test_expect_success 'partial commit gives cache-tree' '
git checkout -b partial no-children &&
test_commit one &&