From: Junio C Hamano Date: Wed, 3 May 2006 22:32:54 +0000 (-0700) Subject: Fix test-dump-cache-tree in one-tree disappeared case. X-Git-Tag: v1.4.0-rc1~45^2~6 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a84faf777075e54f9faf22dbc6345fd756cd0c8d;p=git.git 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 --- diff --git a/dump-cache-tree.c b/dump-cache-tree.c index fbea263dd..1ccaf5177 100644 --- a/dump-cache-tree.c +++ b/dump-cache-tree.c @@ -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, "");