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

Function one_local_ref

remote.c:2467–2481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2465}
2466
2467static int one_local_ref(const struct reference *ref, void *cb_data)
2468{
2469 struct ref ***local_tail = cb_data;
2470 struct ref *local_ref;
2471
2472 /* we already know it starts with refs/ to get here */
2473 if (check_refname_format(ref->name + 5, 0))
2474 return 0;
2475
2476 local_ref = alloc_ref(ref->name);
2477 oidcpy(&local_ref->new_oid, ref->oid);
2478 **local_tail = local_ref;
2479 *local_tail = &local_ref->next;
2480 return 0;
2481}
2482
2483struct ref *get_local_heads(void)
2484{

Callers

nothing calls this directly

Calls 3

check_refname_formatFunction · 0.85
alloc_refFunction · 0.85
oidcpyFunction · 0.85

Tested by

no test coverage detected