]> git.ipfire.org Git - thirdparty/git.git/commit - pkt-line.c
pkt-line: add stdio packet write functions
authorJacob Vosmaer <jacob@gitlab.com>
Wed, 1 Sep 2021 12:54:41 +0000 (14:54 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Sep 2021 17:20:39 +0000 (10:20 -0700)
commit96328398b3803c96f6a91edc39ccebd4bb9dd12c
tree66665c9a45b013b17f680224eab183301736045c
parentc4203212e360b25a1c69467b5a8437d45a373cac
pkt-line: add stdio packet write functions

This adds three new functions to pkt-line.c: packet_fwrite,
packet_fwrite_fmt and packet_fflush. Besides writing a pktline flush
packet, packet_fflush also flushes the stdio buffer of the stream.

Helped-by: Patrick Steinhardt <ps@pks.im>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Jacob Vosmaer <jacob@gitlab.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
pkt-line.c
pkt-line.h
write-or-die.c