MCPcopy Index your code
hub / github.com/git/git / add_send_request

Function add_send_request

http-push.c:671–706  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

669}
670
671static int add_send_request(struct object *obj, struct remote_lock *lock)
672{
673 struct transfer_request *request;
674 struct packed_git *target;
675
676 /* Keep locks active */
677 check_locks();
678
679 /*
680 * Don't push the object if it's known to exist on the remote
681 * or is already in the request queue
682 */
683 if (remote_dir_exists[obj->oid.hash[0]] == -1)
684 get_remote_object_list(obj->oid.hash[0]);
685 if (obj->flags & (REMOTE | PUSHING))
686 return 0;
687 target = packfile_list_find_oid(repo->packs.head, &obj->oid);
688 if (target) {
689 obj->flags |= REMOTE;
690 return 0;
691 }
692
693 obj->flags |= PUSHING;
694 CALLOC_ARRAY(request, 1);
695 request->obj = obj;
696 request->lock = lock;
697 request->state = NEED_PUSH;
698 strbuf_init(&request->buffer.buf, 0);
699 request->next = request_queue_head;
700 request_queue_head = request;
701
702 fill_active_slots();
703 step_active_slots();
704
705 return 1;
706}
707
708static int fetch_indices(void)
709{

Callers 1

get_deltaFunction · 0.85

Calls 6

check_locksFunction · 0.85
get_remote_object_listFunction · 0.85
packfile_list_find_oidFunction · 0.85
strbuf_initFunction · 0.85
fill_active_slotsFunction · 0.85
step_active_slotsFunction · 0.85

Tested by

no test coverage detected