MCPcopy Index your code
hub / github.com/git/git / process_shallow

Function process_shallow

connect.c:311–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311static 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
330enum get_remote_heads_state {
331 EXPECTING_FIRST_REF = 0,

Callers 1

get_remote_headsFunction · 0.70

Calls 4

get_oid_hex_algopFunction · 0.85
oid_array_appendFunction · 0.85
check_no_capabilitiesFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected