On Wed, Feb 06, 2008 at 08:31:08PM +0000, Junio C Hamano wrote:
truct patch_ids *ids, const cha
Why wouldn't you just use strbuf_detach ? I mean replacing:
+ info->message_id =3D buf.buf;
with:
+ info->message_id =3D strbuf_detach(&buf, NULL);
isn't really hard to read, and has the nice side effect to prevent
errors that could happen in the future (like reusing buf and screwing
with info->message_id without noticing it). I'd rather stand on the safe
side here, it's more forward-compatible and idiot-proof[0].
[0] Not that I believe git contributors are idiots, but I firmly
believe in defensive programming when it doesn't impact
performances. And I don't believe it would here.
--=20
=C2=B7O=C2=B7 Pierre Habouzit
=C2=B7=C2=B7O madcoder@debia=
n.org
OOO http://www.madism.org