On Fri, Aug 26, 2016 at 10:10:50AM -0700, Junio C Hamano wrote:
> Lars Schneider writes:
>
> > I agree with your criticism of the code duplication.
> >
> > However, I thought it would be OK, as Peff already
> > tried to refactor it...
> > http://public-inbox.org/git/20160810150139.lpxyrqkr53s5
Lars Schneider writes:
> I agree with your criticism of the code duplication.
>
> However, I thought it would be OK, as Peff already
> tried to refactor it...
> http://public-inbox.org/git/20160810150139.lpxyrqkr53s5f...@sigill.intra.peff.net/
>
> ... and I got the impression you agreed with Pe
> On 25 Aug 2016, at 23:41, Junio C Hamano wrote:
>
> larsxschnei...@gmail.com writes:
>
>> From: Lars Schneider
>>
>> packet_write_fmt() would die in case of a write error even though for
>> some callers an error would be acceptable. Add packet_write_fmt_gently()
>> which writes a formatted
larsxschnei...@gmail.com writes:
> From: Lars Schneider
>
> packet_write_fmt() would die in case of a write error even though for
> some callers an error would be acceptable. Add packet_write_fmt_gently()
> which writes a formatted pkt-line and returns `0` for success and `-1`
> for an error.
>
>
On 25 Aug 2016, at 20:12, Stefan Beller wrote:
>> +int packet_write_fmt_gently(int fd, const char *fmt, ...)
>> +{
>> + static struct strbuf buf = STRBUF_INIT;
>> + va_list args;
>> +
>> + strbuf_reset(&buf);
>> + va_start(args, fmt);
>> + format_packet(&buf, fmt, ar
> +int packet_write_fmt_gently(int fd, const char *fmt, ...)
> +{
> + static struct strbuf buf = STRBUF_INIT;
> + va_list args;
> +
> + strbuf_reset(&buf);
> + va_start(args, fmt);
> + format_packet(&buf, fmt, args);
format_packet also takes care of tracing the conten
From: Lars Schneider
packet_write_fmt() would die in case of a write error even though for
some callers an error would be acceptable. Add packet_write_fmt_gently()
which writes a formatted pkt-line and returns `0` for success and `-1`
for an error.
Signed-off-by: Lars Schneider
---
pkt-line.c
7 matches
Mail list logo