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

Function packet_fwrite

pkt-line.c:251–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251void packet_fwrite(FILE *f, const char *buf, size_t size)
252{
253 size_t packet_size;
254 char header[4];
255
256 if (size > LARGE_PACKET_DATA_MAX)
257 die(_("packet write failed - data exceeds max packet size"));
258
259 packet_trace(buf, size, 1);
260 packet_size = size + 4;
261
262 set_packet_header(header, packet_size);
263 fwrite_or_die(f, header, 4);
264 fwrite_or_die(f, buf, size);
265}
266
267void packet_fwrite_fmt(FILE *fh, const char *fmt, ...)
268{

Callers 1

send_refFunction · 0.85

Calls 4

packet_traceFunction · 0.85
set_packet_headerFunction · 0.85
fwrite_or_dieFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected