| 309 | } |
| 310 | |
| 311 | static int process_shallow(const struct packet_reader *reader, size_t len, |
| 312 | struct oid_array *shallow_points) |
| 313 | { |
| 314 | const char *line = reader->line; |
| 315 | const char *arg; |
| 316 | struct object_id old_oid; |
| 317 | |
| 318 | if (!skip_prefix(line, "shallow ", &arg)) |
| 319 | return 0; |
| 320 | |
| 321 | if (get_oid_hex_algop(arg, &old_oid, reader->hash_algo)) |
| 322 | die(_("protocol error: expected shallow sha-1, got '%s'"), arg); |
| 323 | if (!shallow_points) |
| 324 | die(_("repository on the other end cannot be shallow")); |
| 325 | oid_array_append(shallow_points, &old_oid); |
| 326 | check_no_capabilities(line, len); |
| 327 | return 1; |
| 328 | } |
| 329 | |
| 330 | enum get_remote_heads_state { |
| 331 | EXPECTING_FIRST_REF = 0, |
no test coverage detected