> On 10 Aug 2016, at 15:43, Jeff King wrote:
>
> On Wed, Aug 10, 2016 at 03:04:01PM +0200, larsxschnei...@gmail.com wrote:
>
>> +int packet_write_gently_fmt(int fd, const char *fmt, ...)
>> +{
>> +static struct strbuf buf = STRBUF_INIT;
>> +va_list args;
>> +
>> +
Jeff King writes:
> On Wed, Aug 10, 2016 at 03:04:01PM +0200, larsxschnei...@gmail.com wrote:
>
>> +int packet_write_gently_fmt(int fd, const char *fmt, ...)
>> +{
>> +static struct strbuf buf = STRBUF_INIT;
>> +va_list args;
>> +
>> +strbuf_reset();
>> +
On Wed, Aug 10, 2016 at 04:10:02PM +0200, Lars Schneider wrote:
>
> > On 10 Aug 2016, at 15:43, Jeff King wrote:
> >
> > On Wed, Aug 10, 2016 at 03:04:01PM +0200, larsxschnei...@gmail.com wrote:
> >
> >> +int packet_write_gently_fmt(int fd, const char *fmt, ...)
> >> +{
> >> +
On Wed, Aug 10, 2016 at 03:04:01PM +0200, larsxschnei...@gmail.com wrote:
> +int packet_write_gently_fmt(int fd, const char *fmt, ...)
> +{
> + static struct strbuf buf = STRBUF_INIT;
> + va_list args;
> +
> + strbuf_reset();
> + va_start(args, fmt);
> + format_packet(1, ,
From: Lars Schneider
packet_write() would die in case of a write error even though for some callers
an error would be acceptable. Add packet_write_gently_fmt() which writes a
formatted pkt-line and returns `0` for success and `-1` for an error.
Signed-off-by: Lars
Lars Schneider writes:
>>> Similarly, I'd think this could share code with the non-gentle form
>>> (which should be able to just call this and die() if returns an error).
>>> Though sometimes the va_list transformation makes that awkward.
>>
>> Yes.
>
> Peff just
> On 10 Aug 2016, at 19:18, Junio C Hamano wrote:
>
> Jeff King writes:
>
>> On Wed, Aug 10, 2016 at 03:04:01PM +0200, larsxschnei...@gmail.com wrote:
>>
>>> +int packet_write_gently_fmt(int fd, const char *fmt, ...)
>>> +{
>>> + static struct strbuf buf =
7 matches
Mail list logo