Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-10-14 23:15:11 +0300
committerJunio C Hamano <gitster@pobox.com>2021-10-15 23:09:05 +0300
commit4f1d3e3e3b35b7fef1763a59f59b369b9674cfc9 (patch)
tree702df3f1159d98a1df045ee052f3e56bdc2bd12b /pkt-line.c
parentaf6d1d602a8f64164b266364339c4e936d5bbc33 (diff)
pkt-line.[ch]: remove unused packet_buf_write_len()
This function was added in f1f4d8acf40 (pkt-line: add packet_buf_write_len function, 2018-03-15) for use in 0f1dc53f45d (remote-curl: implement stateless-connect command, 2018-03-15). In a97d00799a1 (remote-curl: use post_rpc() for protocol v2 also, 2019-02-21) that only user of it went away, let's remove it. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pkt-line.c')
-rw-r--r--pkt-line.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/pkt-line.c b/pkt-line.c
index 9f63eae2e6..2c536e7f16 100644
--- a/pkt-line.c
+++ b/pkt-line.c
@@ -252,22 +252,6 @@ void packet_buf_write(struct strbuf *buf, const char *fmt, ...)
va_end(args);
}
-void packet_buf_write_len(struct strbuf *buf, const char *data, size_t len)
-{
- size_t orig_len, n;
-
- orig_len = buf->len;
- strbuf_addstr(buf, "0000");
- strbuf_add(buf, data, len);
- n = buf->len - orig_len;
-
- if (n > LARGE_PACKET_MAX)
- die(_("protocol error: impossibly long line"));
-
- set_packet_header(&buf->buf[orig_len], n);
- packet_trace(data, len, 1);
-}
-
int write_packetized_from_fd_no_flush(int fd_in, int fd_out)
{
char *buf = xmalloc(LARGE_PACKET_DATA_MAX);