Re: [PATCH v5 04/15] pkt-line: add packet_write_gently()

2016-08-10 Thread Junio C Hamano
Jeff King writes: > On Wed, Aug 10, 2016 at 03:36:45PM +0200, Lars Schneider wrote: > >> > So now we have packet_write() and packet_write_gently(), but they differ >> > in more than just whether they are gentle. That seems like a weird >> > interface. >> > >> > Should we either be picking a new

Re: [PATCH v5 04/15] pkt-line: add packet_write_gently()

2016-08-10 Thread Lars Schneider
> On 10 Aug 2016, at 15:28, Jeff King wrote: > > On Wed, Aug 10, 2016 at 03:04:00PM +0200, larsxschnei...@gmail.com wrote: > >> From: Lars Schneider >> >> packet_write() has two shortcomings. First, it uses format_packet() which >> lets the caller only send string data via "%s". That means it

[PATCH v5 04/15] pkt-line: add packet_write_gently()

2016-08-10 Thread larsxschneider
From: Lars Schneider packet_write() has two shortcomings. First, it 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. Second, it will always die on error. Add packet_write_gently() which writes arbitr

Re: [PATCH v5 04/15] pkt-line: add packet_write_gently()

2016-08-10 Thread Jeff King
On Wed, Aug 10, 2016 at 03:04:00PM +0200, larsxschnei...@gmail.com wrote: > From: Lars Schneider > > packet_write() has two shortcomings. First, it 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

Re: [PATCH v5 04/15] pkt-line: add packet_write_gently()

2016-08-10 Thread Lars Schneider
> On 10 Aug 2016, at 20:21, Junio C Hamano wrote: > > Lars Schneider writes: > >>> On 10 Aug 2016, at 19:17, Junio C Hamano wrote: >>> >> OK. Does this mean I can leave the "packet_write()" to "packet_write_fmt()" >> rename as is in this series? > > I didn't really check what order you are

Re: [PATCH v5 04/15] pkt-line: add packet_write_gently()

2016-08-10 Thread Jeff King
On Wed, Aug 10, 2016 at 03:36:45PM +0200, Lars Schneider wrote: > > So now we have packet_write() and packet_write_gently(), but they differ > > in more than just whether they are gentle. That seems like a weird > > interface. > > > > Should we either be picking a new name (e.g., packet_write_mem

Re: [PATCH v5 04/15] pkt-line: add packet_write_gently()

2016-08-10 Thread Lars Schneider
> On 10 Aug 2016, at 19:17, Junio C Hamano wrote: > > Jeff King writes: > >> On Wed, Aug 10, 2016 at 03:36:45PM +0200, Lars Schneider wrote: >> So now we have packet_write() and packet_write_gently(), but they differ in more than just whether they are gentle. That seems like a weird

Re: [PATCH v5 04/15] pkt-line: add packet_write_gently()

2016-08-10 Thread Junio C Hamano
Lars Schneider writes: >> On 10 Aug 2016, at 19:17, Junio C Hamano wrote: >> > OK. Does this mean I can leave the "packet_write()" to "packet_write_fmt()" > rename as is in this series? I didn't really check what order you are doing things to answer that. If the function that is introduced in