Fix test-dump-cache-tree in one-tree disappeared case.

When reconstructing an invalidated subtree for reference purposes by
test-dump-cache-tree, we did not handle the case where we shouldn't
have a cached and invalidated subtree in the result, leading to an
unneeded die().

Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Junio C Hamano 2006-05-03 15:32:54 -07:00
parent cdc08b33ef
commit a84faf7770
1 changed files with 3 additions and 4 deletions

View File

@ -21,10 +21,9 @@ static int dump_cache_tree(struct cache_tree *it,
int i; int i;
int errs = 0; int errs = 0;


if (!it) if (!it || !ref)
return; /* missing in either */
if (!ref) return 0;
die("internal error");


if (it->entry_count < 0) { if (it->entry_count < 0) {
dump_one(it, pfx, ""); dump_one(it, pfx, "");