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>
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, "");