]> git.ipfire.org Git - thirdparty/git.git/commit - pkt-line.c
pkt-line: add packet_write_gently()
authorLars Schneider <larsxschneider@gmail.com>
Sun, 16 Oct 2016 23:20:33 +0000 (16:20 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Oct 2016 18:36:50 +0000 (11:36 -0700)
commitedfb780cd4fe73474583016055542f5686d3d98d
treef116ce8482464c3e5b375696a47d1bbf89909f3b
parent038ce90f2ff91587f2d61993f5c4c23d6fdca144
pkt-line: add packet_write_gently()

packet_write_fmt_gently() uses format_packet() which lets the caller
only send string data via "%s". That means it cannot be used for
arbitrary data that may contain NULs.

Add packet_write_gently() which writes arbitrary data and does not die
in case of an error. The function is used by other pkt-line functions in
a subsequent patch.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pkt-line.c