summaryrefslogtreecommitdiff
path: root/fsck-objects.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-05-02 05:15:54 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-05-02 05:15:54 (GMT)
commitcdc08b33ef3da0e963f9956e4a66f67cc3330f83 (patch)
tree8b658d2455af9f46e32d3d3e3731be9ab363ccf7 /fsck-objects.c
parent0111ea38cbb9db0e4e245dcd5c86198186bab197 (diff)
downloadgit-cdc08b33ef3da0e963f9956e4a66f67cc3330f83.zip
git-cdc08b33ef3da0e963f9956e4a66f67cc3330f83.tar.gz
git-cdc08b33ef3da0e963f9956e4a66f67cc3330f83.tar.bz2
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>
Diffstat (limited to 'fsck-objects.c')
-rw-r--r--fsck-objects.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fsck-objects.c b/fsck-objects.c
index cc09143..98421aa 100644
--- a/fsck-objects.c
+++ b/fsck-objects.c
@@ -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");
}