summaryrefslogtreecommitdiff
path: root/test-dump-cache-tree.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-09-11 10:33:32 -0700
committerJunio C Hamano <gitster@pobox.com>2014-09-11 10:33:32 -0700
commit3fd13cbcd58f078476cabab926931a3d5bdedfe2 (patch)
treed8126c3dea8b3c7189165db37a6b7978480943e8 /test-dump-cache-tree.c
parent01d678a2263c0c71e42475335b5b0b578936a7d1 (diff)
parent4ed115e9c545fb27a5b80c751b2c04ec7ecc4d97 (diff)
downloadgit-3fd13cbcd58f078476cabab926931a3d5bdedfe2.tar.gz
Merge branch 'dt/cache-tree-repair'
Add a few more places in "commit" and "checkout" that make sure that the cache-tree is fully populated in the index. * dt/cache-tree-repair: cache-tree: do not try to use an invalidated subtree info to build a tree cache-tree: Write updated cache-tree after commit cache-tree: subdirectory tests test-dump-cache-tree: invalid trees are not errors cache-tree: create/update cache-tree on checkout
Diffstat (limited to 'test-dump-cache-tree.c')
-rw-r--r--test-dump-cache-tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test-dump-cache-tree.c b/test-dump-cache-tree.c
index 330ba4f4dd..54c0872fcb 100644
--- a/test-dump-cache-tree.c
+++ b/test-dump-cache-tree.c
@@ -26,16 +26,16 @@ static int dump_cache_tree(struct cache_tree *it,
return 0;
if (it->entry_count < 0) {
+ /* invalid */
dump_one(it, pfx, "");
dump_one(ref, pfx, "#(ref) ");
- if (it->subtree_nr != ref->subtree_nr)
- errs = 1;
}
else {
dump_one(it, pfx, "");
if (hashcmp(it->sha1, ref->sha1) ||
ref->entry_count != it->entry_count ||
ref->subtree_nr != it->subtree_nr) {
+ /* claims to be valid but is lying */
dump_one(ref, pfx, "#(ref) ");
errs = 1;
}