MCPcopy Create free account
hub / github.com/git/git / consume_shallow_list

Function consume_shallow_list

fetch-pack.c:205–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203};
204
205static 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
225static enum ack_type get_ack(struct packet_reader *reader,
226 struct object_id *result_oid)

Callers 1

find_commonFunction · 0.85

Calls 3

packet_reader_readFunction · 0.85
starts_withFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected