| 563 | } |
| 564 | |
| 565 | int 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 | |
| 587 | void normalize_glob_ref(struct string_list_item *item, const char *prefix, |
| 588 | const char *pattern) |
no test coverage detected