MCPcopy Create free account
hub / github.com/git/git / fill_active_slot

Function fill_active_slot

http-walker.c:133–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133static 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
153static void prefetch(struct walker *walker, const struct object_id *oid)
154{

Callers

nothing calls this directly

Calls 2

odb_has_objectFunction · 0.85
start_object_requestFunction · 0.85

Tested by

no test coverage detected