@matheusbsbs / matheus-bagliano / commits / cdc08b33ef
Fork 0

fsck-objects: mark objects reachable from cache-tree

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>

Junio C Hamano committed May 1, 2006 at 22:15 UTC cdc08b33ef3da0e963f9956e4a66f67cc3330f83
1 file changed +2
fsck-objects.c
+2
@@ -446,6 +446,8 @@ static int fsck_cache_tree(struct cache_tree *it)
446
447 if (0 <= it->entry_count) {
448 struct object *obj = parse_object(it->sha1);
449 + mark_reachable(obj, REACHABLE);
450 + obj->used = 1;
451 if (obj->type != tree_type)
452 err |= objerror(obj, "non-tree in cache-tree");
453 }