diff options
author | Junio C Hamano <junkio@cox.net> | 2006-05-03 15:32:54 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-05-03 15:33:32 -0700 |
commit | a84faf777075e54f9faf22dbc6345fd756cd0c8d (patch) | |
tree | cbf443bd6fb3e52055d3831154c870bf947f4f18 /dump-cache-tree.c | |
parent | cdc08b33ef3da0e963f9956e4a66f67cc3330f83 (diff) | |
download | git-a84faf777075e54f9faf22dbc6345fd756cd0c8d.tar.gz git-a84faf777075e54f9faf22dbc6345fd756cd0c8d.tar.xz |
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.c | 7 |
1 files changed, 3 insertions, 4 deletions
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, ""); |