| 149 | } |
| 150 | |
| 151 | static int add_info_ref(const struct reference *ref, void *cb_data) |
| 152 | { |
| 153 | struct update_info_ctx *uic = cb_data; |
| 154 | struct object *o = parse_object(uic->repo, ref->oid); |
| 155 | if (!o) |
| 156 | return -1; |
| 157 | |
| 158 | if (uic_printf(uic, "%s %s\n", oid_to_hex(ref->oid), ref->name) < 0) |
| 159 | return -1; |
| 160 | |
| 161 | if (o->type == OBJ_TAG) { |
| 162 | o = deref_tag(uic->repo, o, ref->name, 0); |
| 163 | if (o) |
| 164 | if (uic_printf(uic, "%s %s^{}\n", |
| 165 | oid_to_hex(&o->oid), ref->name) < 0) |
| 166 | return -1; |
| 167 | } |
| 168 | return 0; |
| 169 | } |
| 170 | |
| 171 | static int generate_info_refs(struct update_info_ctx *uic) |
| 172 | { |
nothing calls this directly
no test coverage detected