| 131 | } |
| 132 | |
| 133 | static int fill_active_slot(void *data UNUSED) |
| 134 | { |
| 135 | struct object_request *obj_req; |
| 136 | struct list_head *pos, *tmp, *head = &object_queue_head; |
| 137 | |
| 138 | list_for_each_safe(pos, tmp, head) { |
| 139 | obj_req = list_entry(pos, struct object_request, node); |
| 140 | if (obj_req->state == WAITING) { |
| 141 | if (odb_has_object(the_repository->objects, &obj_req->oid, |
| 142 | ODB_HAS_OBJECT_RECHECK_PACKED | ODB_HAS_OBJECT_FETCH_PROMISOR)) |
| 143 | obj_req->state = COMPLETE; |
| 144 | else { |
| 145 | start_object_request(obj_req); |
| 146 | return 1; |
| 147 | } |
| 148 | } |
| 149 | } |
| 150 | return 0; |
| 151 | } |
| 152 | |
| 153 | static void prefetch(struct walker *walker, const struct object_id *oid) |
| 154 | { |
nothing calls this directly
no test coverage detected