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>
This commit is contained in:
Junio C Hamano 2006-05-03 15:32:54 -07:00
Родитель cdc08b33ef
Коммит a84faf7770
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -21,10 +21,9 @@ static int dump_cache_tree(struct cache_tree *it,
int i;
int errs = 0;
if (!it)
return;
if (!ref)
die("internal error");
if (!it || !ref)
/* missing in either */
return 0;
if (it->entry_count < 0) {
dump_one(it, pfx, "");