summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLibravatar Jacob Vosmaer <jacob@gitlab.com>2021-09-01 14:54:41 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-01 10:20:39 -0700
commit96328398b3803c96f6a91edc39ccebd4bb9dd12c (patch)
tree66665c9a45b013b17f680224eab183301736045c /cache.h
parentThe first batch post 2.33 (diff)
downloadtgif-96328398b3803c96f6a91edc39ccebd4bb9dd12c.tar.xz
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>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index d23de69368..011dac4eb7 100644
--- a/cache.h
+++ b/cache.h
@@ -1738,6 +1738,8 @@ extern const char *git_mailmap_blob;
void maybe_flush_or_die(FILE *, const char *);
__attribute__((format (printf, 2, 3)))
void fprintf_or_die(FILE *, const char *fmt, ...);
+void fwrite_or_die(FILE *f, const void *buf, size_t count);
+void fflush_or_die(FILE *f);
#define COPY_READ_ERROR (-2)
#define COPY_WRITE_ERROR (-3)