Skip to content

Commit 9eb86f4

Browse files
jonathantanmygitster
authored andcommitted
fsck: do not lazy fetch known non-promisor object
There is a call to has_object_file(), which lazily fetches missing objects in a partial clone, when the object is known to not be a promisor object. Change that call to has_object(), which does not do any lazy fetching. Signed-off-by: Jonathan Tan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ee47243 commit 9eb86f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/fsck.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ static int mark_object(struct object *obj, int type, void *data, struct fsck_opt
168168
return 0;
169169

170170
if (!(obj->flags & HAS_OBJ)) {
171-
if (parent && !has_object_file(&obj->oid)) {
171+
if (parent && !has_object(the_repository, &obj->oid, 1)) {
172172
printf_ln(_("broken link from %7s %s\n"
173173
" to %7s %s"),
174174
printable_type(&parent->oid, parent->type),

0 commit comments

Comments
 (0)