Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
fsck-objects: mark objects reachable from cache-tree
author
Junio C Hamano
<junkio@cox.net>
Tue, 2 May 2006 05:15:54 +0000
(22:15 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Tue, 2 May 2006 05:15:54 +0000
(22:15 -0700)
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>
fsck-objects.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
0111ea3
)
diff --git
a/fsck-objects.c
b/fsck-objects.c
index cc09143a92a64a0d7e14fb7195cd39c05bb0b49f..98421aab308086edc871001842dea1f8a06af71c 100644
(file)
--- 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");
}