| 281 | } |
| 282 | |
| 283 | static int process_ref(const struct packet_reader *reader, size_t len, |
| 284 | struct ref ***list, unsigned int flags, |
| 285 | struct oid_array *extra_have) |
| 286 | { |
| 287 | const char *line = reader->line; |
| 288 | struct object_id old_oid; |
| 289 | const char *name; |
| 290 | |
| 291 | if (parse_oid_hex_algop(line, &old_oid, &name, reader->hash_algo)) |
| 292 | return 0; |
| 293 | if (*name != ' ') |
| 294 | return 0; |
| 295 | name++; |
| 296 | |
| 297 | if (extra_have && !strcmp(name, ".have")) { |
| 298 | oid_array_append(extra_have, &old_oid); |
| 299 | } else if (!strcmp(name, "capabilities^{}")) { |
| 300 | die(_("protocol error: unexpected capabilities^{}")); |
| 301 | } else if (check_ref(name, flags)) { |
| 302 | struct ref *ref = alloc_ref(name); |
| 303 | oidcpy(&ref->old_oid, &old_oid); |
| 304 | **list = ref; |
| 305 | *list = &ref->next; |
| 306 | } |
| 307 | check_no_capabilities(line, len); |
| 308 | return 1; |
| 309 | } |
| 310 | |
| 311 | static int process_shallow(const struct packet_reader *reader, size_t len, |
| 312 | struct oid_array *shallow_points) |
no test coverage detected