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

Function refs_head_ref_namespaced

refs.c:565–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

563}
564
565int refs_head_ref_namespaced(struct ref_store *refs, refs_for_each_cb fn, void *cb_data)
566{
567 struct strbuf buf = STRBUF_INIT;
568 int ret = 0;
569 struct object_id oid;
570 int flag;
571
572 strbuf_addf(&buf, "%sHEAD", get_git_namespace());
573 if (!refs_read_ref_full(refs, buf.buf, RESOLVE_REF_READING, &oid, &flag)) {
574 struct reference ref = {
575 .name = buf.buf,
576 .oid = &oid,
577 .flags = flag,
578 };
579
580 ret = fn(&ref, cb_data);
581 }
582 strbuf_release(&buf);
583
584 return ret;
585}
586
587void normalize_glob_ref(struct string_list_item *item, const char *prefix,
588 const char *pattern)

Callers 2

upload_packFunction · 0.85
get_headFunction · 0.85

Calls 4

strbuf_addfFunction · 0.85
get_git_namespaceFunction · 0.85
refs_read_ref_fullFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected