diff --git a/builtin/fsck.c b/builtin/fsck.c index 37aa07da78..fbf26cafcf 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -168,7 +168,7 @@ static int mark_object(struct object *obj, int type, void *data, struct fsck_opt return 0; if (!(obj->flags & HAS_OBJ)) { - if (parent && !has_object_file(&obj->oid)) { + if (parent && !has_object(the_repository, &obj->oid, 1)) { printf_ln(_("broken link from %7s %s\n" " to %7s %s"), printable_type(&parent->oid, parent->type),