Re: [PATCH v5 12/16] merge-recursive: flush output buffer before printing error messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 27, 2016 at 2:37 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
>> +     strbuf_vaddf(&o->obuf, err, params);
>> +     error("%s", o->obuf.buf);
>> +     strbuf_reset(&o->obuf);
>
> Sneaky ;-)

Just to avoid confusion, I am _fine_ with this "we happen to have
a strbuf that we know to be empty at this point, so let's reuse it
and clean after ourselves before returning".

I just found it somewhere between clever and ugly, and "sneaky"
was the first word that came to my mind.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]