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

Function queue_commands_from_cert

builtin/receive-pack.c:2179–2199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2177}
2178
2179static void queue_commands_from_cert(struct command **tail,
2180 struct strbuf *push_cert)
2181{
2182 const char *boc, *eoc;
2183
2184 if (*tail)
2185 die("protocol error: got both push certificate and unsigned commands");
2186
2187 boc = strstr(push_cert->buf, "\n\n");
2188 if (!boc)
2189 die("malformed push certificate %.*s", 100, push_cert->buf);
2190 else
2191 boc += 2;
2192 eoc = push_cert->buf + parse_signed_buffer(push_cert->buf, push_cert->len);
2193
2194 while (boc < eoc) {
2195 const char *eol = memchr(boc, '\n', eoc - boc);
2196 tail = queue_command(tail, boc, eol ? eol - boc : eoc - boc);
2197 boc = eol ? eol + 1 : eoc;
2198 }
2199}
2200
2201static struct command *read_head_info(struct packet_reader *reader,
2202 struct oid_array *shallow)

Callers 1

read_head_infoFunction · 0.85

Calls 3

parse_signed_bufferFunction · 0.85
queue_commandFunction · 0.85
dieFunction · 0.50

Tested by

no test coverage detected