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

Function report

builtin/receive-pack.c:2536–2558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2534}
2535
2536static void report(struct command *commands, const char *unpack_status)
2537{
2538 struct command *cmd;
2539 struct strbuf buf = STRBUF_INIT;
2540
2541 packet_buf_write(&buf, "unpack %s\n",
2542 unpack_status ? unpack_status : "ok");
2543 for (cmd = commands; cmd; cmd = cmd->next) {
2544 if (!cmd->error_string)
2545 packet_buf_write(&buf, "ok %s\n",
2546 cmd->ref_name);
2547 else
2548 packet_buf_write(&buf, "ng %s %s\n",
2549 cmd->ref_name, cmd->error_string);
2550 }
2551 packet_buf_flush(&buf);
2552
2553 if (use_sideband)
2554 send_sideband(1, 1, buf.buf, buf.len, use_sideband);
2555 else
2556 write_or_die(1, buf.buf, buf.len);
2557 strbuf_release(&buf);
2558}
2559
2560static void report_v2(struct command *commands, const char *unpack_status)
2561{

Callers 1

cmd_receive_packFunction · 0.70

Calls 5

packet_buf_writeFunction · 0.85
packet_buf_flushFunction · 0.85
send_sidebandFunction · 0.85
write_or_dieFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected