MCPcopy Create free account
hub / github.com/git/git / refs_head_ref

Function refs_head_ref

refs.c:1805–1822  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1803}
1804
1805int refs_head_ref(struct ref_store *refs, refs_for_each_cb fn, void *cb_data)
1806{
1807 struct object_id oid;
1808 int flag;
1809
1810 if (refs_resolve_ref_unsafe(refs, "HEAD", RESOLVE_REF_READING,
1811 &oid, &flag)) {
1812 struct reference ref = {
1813 .name = "HEAD",
1814 .oid = &oid,
1815 .flags = flag,
1816 };
1817
1818 return fn(&ref, cb_data);
1819 }
1820
1821 return 0;
1822}
1823
1824struct ref_iterator *refs_ref_iterator_begin(
1825 struct ref_store *refs,

Callers 11

do_filter_refsFunction · 0.85
mark_reachable_objectsFunction · 0.85
load_ref_decorationsFunction · 0.85
get_oid_with_context_1Function · 0.85
post_assign_shallowFunction · 0.85
cmd_show_ref__patternsFunction · 0.85
can_use_local_refsFunction · 0.85
status_submoduleFunction · 0.85

Calls 1

refs_resolve_ref_unsafeFunction · 0.85

Tested by

no test coverage detected