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

Function start_move

http-push.c:427–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425}
426
427static void start_move(struct transfer_request *request)
428{
429 struct active_request_slot *slot;
430 struct curl_slist *dav_headers = http_copy_default_headers();
431
432 slot = get_active_slot();
433 slot->callback_func = process_response;
434 slot->callback_data = request;
435 curl_setup_http_get(slot->curl, request->url, DAV_MOVE);
436 dav_headers = curl_slist_append(dav_headers, request->dest);
437 dav_headers = curl_slist_append(dav_headers, "Overwrite: T");
438 curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, dav_headers);
439
440 if (start_active_slot(slot)) {
441 request->slot = slot;
442 request->state = RUN_MOVE;
443 request->headers = dav_headers;
444 } else {
445 request->state = ABORTED;
446 FREE_AND_NULL(request->url);
447 curl_slist_free_all(dav_headers);
448 }
449}
450
451static int refresh_lock(struct remote_lock *lock)
452{

Callers 1

finish_requestFunction · 0.85

Calls 4

get_active_slotFunction · 0.85
curl_setup_http_getFunction · 0.85
start_active_slotFunction · 0.85

Tested by

no test coverage detected