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

Function one_remote_ref

http-push.c:1432–1462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1430static struct ref *remote_refs;
1431
1432static void one_remote_ref(const char *refname)
1433{
1434 struct ref *ref;
1435 struct object *obj;
1436
1437 ref = alloc_ref(refname);
1438
1439 if (http_fetch_ref(repo->url, ref) != 0) {
1440 fprintf(stderr,
1441 "Unable to fetch ref %s from %s\n",
1442 refname, repo->url);
1443 free(ref);
1444 return;
1445 }
1446
1447 /*
1448 * Fetch a copy of the object if it doesn't exist locally - it
1449 * may be required for updating server info later.
1450 */
1451 if (repo->can_update_info_refs &&
1452 !odb_has_object(the_repository->objects, &ref->old_oid,
1453 ODB_HAS_OBJECT_RECHECK_PACKED | ODB_HAS_OBJECT_FETCH_PROMISOR)) {
1454 obj = lookup_unknown_object(the_repository, &ref->old_oid);
1455 fprintf(stderr, " fetch %s for %s\n",
1456 oid_to_hex(&ref->old_oid), refname);
1457 add_fetch_request(obj);
1458 }
1459
1460 ref->next = remote_refs;
1461 remote_refs = ref;
1462}
1463
1464static void get_dav_remote_heads(void)
1465{

Callers 1

process_ls_refFunction · 0.85

Calls 6

alloc_refFunction · 0.85
http_fetch_refFunction · 0.85
odb_has_objectFunction · 0.85
lookup_unknown_objectFunction · 0.85
oid_to_hexFunction · 0.85
add_fetch_requestFunction · 0.85

Tested by

no test coverage detected