Skip to content

Commit

Permalink
fsck-objects: mark objects reachable from cache-tree
Browse files Browse the repository at this point in the history
When fsck-objects scanned cache-tree, it forgot to mark the
trees it found reachable and in use.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed May 2, 2006
1 parent 0111ea3 commit cdc08b3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fsck-objects.c
Expand Up @@ -446,6 +446,8 @@ static int fsck_cache_tree(struct cache_tree *it)

if (0 <= it->entry_count) {
struct object *obj = parse_object(it->sha1);
mark_reachable(obj, REACHABLE);
obj->used = 1;
if (obj->type != tree_type)
err |= objerror(obj, "non-tree in cache-tree");
}
Expand Down

0 comments on commit cdc08b3

Please sign in to comment.