| 519 | } |
| 520 | |
| 521 | static int show_text_ref(const struct reference *ref, void *cb_data) |
| 522 | { |
| 523 | const char *name_nons = strip_namespace(ref->name); |
| 524 | struct strbuf *buf = cb_data; |
| 525 | struct object *o = parse_object(the_repository, ref->oid); |
| 526 | if (!o) |
| 527 | return 0; |
| 528 | |
| 529 | strbuf_addf(buf, "%s\t%s\n", oid_to_hex(ref->oid), name_nons); |
| 530 | if (o->type == OBJ_TAG) { |
| 531 | o = deref_tag(the_repository, o, ref->name, 0); |
| 532 | if (!o) |
| 533 | return 0; |
| 534 | strbuf_addf(buf, "%s\t%s^{}\n", oid_to_hex(&o->oid), |
| 535 | name_nons); |
| 536 | } |
| 537 | return 0; |
| 538 | } |
| 539 | |
| 540 | static void get_info_refs(struct strbuf *hdr, char *arg UNUSED) |
| 541 | { |
nothing calls this directly
no test coverage detected