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

Function send_acks

upload-pack.c:1686–1708  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1684}
1685
1686static int send_acks(struct upload_pack_data *data, struct object_array *acks)
1687{
1688 int i;
1689
1690 packet_writer_write(&data->writer, "acknowledgments\n");
1691
1692 /* Send Acks */
1693 if (!acks->nr)
1694 packet_writer_write(&data->writer, "NAK\n");
1695
1696 for (i = 0; i < acks->nr; i++) {
1697 packet_writer_write(&data->writer, "ACK %s\n",
1698 oid_to_hex(&acks->objects[i].item->oid));
1699 }
1700
1701 if (!data->wait_for_done && ok_to_give_up(data)) {
1702 /* Send Ready */
1703 packet_writer_write(&data->writer, "ready\n");
1704 return 1;
1705 }
1706
1707 return 0;
1708}
1709
1710static int process_haves_and_send_acks(struct upload_pack_data *data)
1711{

Callers 1

Calls 3

packet_writer_writeFunction · 0.85
oid_to_hexFunction · 0.85
ok_to_give_upFunction · 0.85

Tested by

no test coverage detected