diff --git a/fsck-objects.c b/fsck-objects.c
index 2b1aab488f2b8d64fa799adf427b6eeca35ac757..769bb2a6a75f34192cfd7d6f99ea8f6efbfdce7e 100644 (file)
--- a/fsck-objects.c
+++ b/fsck-objects.c
/* Look up all the requirements, warn about missing objects.. */
for (i = 0; i < obj_allocs; i++) {
+ const struct object_refs *refs;
struct object *obj = objs[i];
if (!obj)
continue;
}
- if (obj->refs) {
- const struct object_refs *refs = obj->refs;
+ refs = lookup_object_refs(obj);
+ if (refs) {
unsigned j;
for (j = 0; j < refs->count; j++) {
struct object *ref = refs->ref[j];