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>
Junio C Hamano committed
May 3, 2006 at 15:32 UTC
a84faf777075e54f9faf22dbc6345fd756cd0c8d
1 file changed
+3
-4
dump-cache-tree.c
+3
-4
@@ -21,10 +21,9 @@ static int dump_cache_tree(struct cache_tree *it,
21
int i;
22
int errs = 0;
23
24
- if (!it)
25
- return;
26
- if (!ref)
27
- die("internal error");
24
+ if (!it || !ref)
25
+ /* missing in either */
26
+ return 0;
27
28
if (it->entry_count < 0) {
29
dump_one(it, pfx, "");