summaryrefslogtreecommitdiff
path: root/pkt-line.h
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-10-14 22:15:12 +0200
committerJunio C Hamano <gitster@pobox.com>2021-10-15 13:09:40 -0700
commitec9a37d69b4b327c08668bb897f27f25276a5b1c (patch)
treeafda2bad028cbea60a5a17811a9d8fe3815fbc84 /pkt-line.h
parent4f1d3e3e3b35b7fef1763a59f59b369b9674cfc9 (diff)
downloadgit-ec9a37d69b4b327c08668bb897f27f25276a5b1c.tar.gz
pkt-line.[ch]: remove unused packet_read_line_buf()
This function was added in 4981fe750b1 (pkt-line: share buffer/descriptor reading implementation, 2013-02-23), but in 01f9ec64c8a (Use packet_reader instead of packet_read_line, 2018-12-29) the code that was using it was removed. Since it's being removed we can in turn remove the "src" and "src_len" arguments to packet_read(), all the remaining users just passed a NULL/NULL pair to it. That function is only a thin wrapper for packet_read_with_status() which still needs those arguments, but for the thin packet_read() convenience wrapper we can do away with it for now. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pkt-line.h')
-rw-r--r--pkt-line.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/pkt-line.h b/pkt-line.h
index 25dcb6a1fb..f8e01c231d 100644
--- a/pkt-line.h
+++ b/pkt-line.h
@@ -76,8 +76,7 @@ int write_packetized_from_buf_no_flush(const char *src_in, size_t len, int fd_ou
#define PACKET_READ_CHOMP_NEWLINE (1u<<1)
#define PACKET_READ_DIE_ON_ERR_PACKET (1u<<2)
#define PACKET_READ_GENTLE_ON_READ_ERROR (1u<<3)
-int packet_read(int fd, char **src_buffer, size_t *src_len, char
- *buffer, unsigned size, int options);
+int packet_read(int fd, char *buffer, unsigned size, int options);
/*
* Convert a four hex digit packet line length header into its numeric
@@ -127,12 +126,6 @@ char *packet_read_line(int fd, int *size);
int packet_read_line_gently(int fd, int *size, char **dst_line);
/*
- * Same as packet_read_line, but read from a buf rather than a descriptor;
- * see packet_read for details on how src_* is used.
- */
-char *packet_read_line_buf(char **src_buf, size_t *src_len, int *size);
-
-/*
* Reads a stream of variable sized packets until a flush packet is detected.
*/
ssize_t read_packetized_to_strbuf(int fd_in, struct strbuf *sb_out, int options);