Re: [PATCH v7 06/10] pkt-line: add functions to read/write flush terminated packet streams

2016-09-11 Thread Junio C Hamano
Stefan Beller writes: > So as a caller the strbuf is in a different state in case of error > depending whether > the strbuf already had some data in it. I think it would be better if > we only did > `strbuf_setlen(sb_out, oldlen);` here, such that the caller can >

Re: [PATCH v7 06/10] pkt-line: add functions to read/write flush terminated packet streams

2016-09-11 Thread Stefan Beller
On Sun, Sep 11, 2016 at 5:33 AM, Lars Schneider wrote: > Does this convince you to keep the proposed error handling? If yes, then > I would add a comment to the function to document that behavior explicitly! oops. I should read the docs more carefully. Thanks for

Re: [PATCH v7 06/10] pkt-line: add functions to read/write flush terminated packet streams

2016-09-11 Thread Lars Schneider
> On 08 Sep 2016, at 23:49, Stefan Beller wrote: > > On Thu, Sep 8, 2016 at 11:21 AM, wrote: >> From: Lars Schneider >> >> write_packetized_from_fd() and write_packetized_from_buf() write a >> stream of packets. All

Re: [PATCH v7 06/10] pkt-line: add functions to read/write flush terminated packet streams

2016-09-08 Thread Stefan Beller
On Thu, Sep 8, 2016 at 11:21 AM, wrote: > From: Lars Schneider > > write_packetized_from_fd() and write_packetized_from_buf() write a > stream of packets. All content packets use the maximal packet size > except for the last one. After the

[PATCH v7 06/10] pkt-line: add functions to read/write flush terminated packet streams

2016-09-08 Thread larsxschneider
From: Lars Schneider write_packetized_from_fd() and write_packetized_from_buf() write a stream of packets. All content packets use the maximal packet size except for the last one. After the last content packet a `flush` control packet is written.