1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-17 22:44:49 +01:00

Merge branch 'jc/cache-tree' into next

* jc/cache-tree:
  fsck-objects: do not segfault on missing tree in cache-tree
This commit is contained in:
Junio C Hamano 2006-05-04 00:17:28 -07:00
commit 25a9ff836f

View file

@ -446,6 +446,11 @@ static int fsck_cache_tree(struct cache_tree *it)
if (0 <= it->entry_count) { if (0 <= it->entry_count) {
struct object *obj = parse_object(it->sha1); struct object *obj = parse_object(it->sha1);
if (!obj) {
error("%s: invalid sha1 pointer in cache-tree",
sha1_to_hex(it->sha1));
return 1;
}
mark_reachable(obj, REACHABLE); mark_reachable(obj, REACHABLE);
obj->used = 1; obj->used = 1;
if (obj->type != tree_type) if (obj->type != tree_type)