| 642 | static void get_remote_object_list(unsigned char parent); |
| 643 | |
| 644 | static void add_fetch_request(struct object *obj) |
| 645 | { |
| 646 | struct transfer_request *request; |
| 647 | |
| 648 | check_locks(); |
| 649 | |
| 650 | /* |
| 651 | * Don't fetch the object if it's known to exist locally |
| 652 | * or is already in the request queue |
| 653 | */ |
| 654 | if (remote_dir_exists[obj->oid.hash[0]] == -1) |
| 655 | get_remote_object_list(obj->oid.hash[0]); |
| 656 | if (obj->flags & (LOCAL | FETCHING)) |
| 657 | return; |
| 658 | |
| 659 | obj->flags |= FETCHING; |
| 660 | CALLOC_ARRAY(request, 1); |
| 661 | request->obj = obj; |
| 662 | request->state = NEED_FETCH; |
| 663 | strbuf_init(&request->buffer.buf, 0); |
| 664 | request->next = request_queue_head; |
| 665 | request_queue_head = request; |
| 666 | |
| 667 | fill_active_slots(); |
| 668 | step_active_slots(); |
| 669 | } |
| 670 | |
| 671 | static int add_send_request(struct object *obj, struct remote_lock *lock) |
| 672 | { |
no test coverage detected