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
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user