summaryrefslogtreecommitdiff
path: root/fsck-objects.c
diff options
context:
space:
mode:
Diffstat (limited to 'fsck-objects.c')
-rw-r--r--fsck-objects.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fsck-objects.c b/fsck-objects.c
index 2b1aab488f..769bb2a6a7 100644
--- a/fsck-objects.c
+++ b/fsck-objects.c
@@ -64,6 +64,7 @@ static void check_connectivity(void)
/* 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)
@@ -78,8 +79,8 @@ static void check_connectivity(void)
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];