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

Function packet_write_fmt_1

pkt-line.c:164–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164static int packet_write_fmt_1(int fd, int gently, const char *prefix,
165 const char *fmt, va_list args)
166{
167 static struct strbuf buf = STRBUF_INIT;
168
169 strbuf_reset(&buf);
170 format_packet(&buf, prefix, fmt, args);
171 if (write_in_full(fd, buf.buf, buf.len) < 0) {
172 if (!gently) {
173 check_pipe(errno);
174 die_errno(_("packet write with format failed"));
175 }
176 return error(_("packet write with format failed"));
177 }
178
179 return 0;
180}
181
182void packet_write_fmt(int fd, const char *fmt, ...)
183{

Callers 4

packet_write_fmtFunction · 0.85
packet_write_fmt_gentlyFunction · 0.85
packet_writer_writeFunction · 0.85
packet_writer_errorFunction · 0.85

Calls 5

format_packetFunction · 0.85
write_in_fullFunction · 0.85
check_pipeFunction · 0.85
die_errnoFunction · 0.85
errorFunction · 0.85

Tested by

no test coverage detected