| 203 | }; |
| 204 | |
| 205 | static void consume_shallow_list(struct fetch_pack_args *args, |
| 206 | struct packet_reader *reader) |
| 207 | { |
| 208 | if (args->stateless_rpc && args->deepen) { |
| 209 | /* If we sent a depth we will get back "duplicate" |
| 210 | * shallow and unshallow commands every time there |
| 211 | * is a block of have lines exchanged. |
| 212 | */ |
| 213 | while (packet_reader_read(reader) == PACKET_READ_NORMAL) { |
| 214 | if (starts_with(reader->line, "shallow ")) |
| 215 | continue; |
| 216 | if (starts_with(reader->line, "unshallow ")) |
| 217 | continue; |
| 218 | die(_("git fetch-pack: expected shallow list")); |
| 219 | } |
| 220 | if (reader->status != PACKET_READ_FLUSH) |
| 221 | die(_("git fetch-pack: expected a flush packet after shallow list")); |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | static enum ack_type get_ack(struct packet_reader *reader, |
| 226 | struct object_id *result_oid) |
no test coverage detected