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

Function update_remote_info_refs

http-push.c:1508–1537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1506}
1507
1508static void update_remote_info_refs(struct remote_lock *lock)
1509{
1510 struct buffer buffer = { STRBUF_INIT, 0 };
1511 struct active_request_slot *slot;
1512 struct slot_results results;
1513 struct curl_slist *dav_headers;
1514
1515 remote_ls("refs/", (PROCESS_FILES | RECURSIVE),
1516 add_remote_info_ref, &buffer.buf);
1517 if (!aborted) {
1518 dav_headers = get_dav_token_headers(lock, DAV_HEADER_IF);
1519
1520 slot = get_active_slot();
1521 slot->results = &results;
1522 curl_setup_http(slot->curl, lock->url, DAV_PUT,
1523 &buffer, fwrite_null);
1524 curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, dav_headers);
1525
1526 if (start_active_slot(slot)) {
1527 run_active_slot(slot);
1528 if (results.curl_result != CURLE_OK) {
1529 fprintf(stderr,
1530 "PUT error: curl result=%d, HTTP code=%ld\n",
1531 results.curl_result, results.http_code);
1532 }
1533 }
1534 curl_slist_free_all(dav_headers);
1535 }
1536 strbuf_release(&buffer.buf);
1537}
1538
1539static int remote_exists(const char *path)
1540{

Callers 1

cmd_mainFunction · 0.85

Calls 7

remote_lsFunction · 0.85
get_dav_token_headersFunction · 0.85
get_active_slotFunction · 0.85
curl_setup_httpFunction · 0.85
start_active_slotFunction · 0.85
run_active_slotFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected