Skip to content

Commit

Permalink
Fix test-dump-cache-tree in one-tree disappeared case.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed May 3, 2006
1 parent cdc08b3 commit a84faf7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions dump-cache-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, "");
Expand Down

0 comments on commit a84faf7

Please sign in to comment.