Browse Source

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 19 years ago
parent
commit
a84faf7770
  1. 7
      dump-cache-tree.c

7
dump-cache-tree.c

@ -21,10 +21,9 @@ static int dump_cache_tree(struct cache_tree *it, @@ -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, "");

Loading…
Cancel
Save