summaryrefslogtreecommitdiff
path: root/dump-cache-tree.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-05-03 22:32:54 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-05-03 22:33:32 (GMT)
commita84faf777075e54f9faf22dbc6345fd756cd0c8d (patch)
treecbf443bd6fb3e52055d3831154c870bf947f4f18 /dump-cache-tree.c
parentcdc08b33ef3da0e963f9956e4a66f67cc3330f83 (diff)
downloadgit-a84faf777075e54f9faf22dbc6345fd756cd0c8d.zip
git-a84faf777075e54f9faf22dbc6345fd756cd0c8d.tar.gz
git-a84faf777075e54f9faf22dbc6345fd756cd0c8d.tar.bz2
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>
Diffstat (limited to 'dump-cache-tree.c')
-rw-r--r--dump-cache-tree.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/dump-cache-tree.c b/dump-cache-tree.c
index fbea263..1ccaf51 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, "");