Merge branch 'mg/timestamp-t-fix'
[gitweb.git] / pkt-line.c
index 7db9119573abe2c8308bd37c670c027c07b425c8..f364944b931a756b3b4819fb49ff5e9e01daf676 100644 (file)
@@ -136,9 +136,10 @@ static void format_packet(struct strbuf *out, const char *fmt, va_list args)
 static int packet_write_fmt_1(int fd, int gently,
                              const char *fmt, va_list args)
 {
-       struct strbuf buf = STRBUF_INIT;
+       static struct strbuf buf = STRBUF_INIT;
        ssize_t count;
 
+       strbuf_reset(&buf);
        format_packet(&buf, fmt, args);
        count = write_in_full(fd, buf.buf, buf.len);
        if (count == buf.len)