From: Jeff King Date: Sat, 14 Jan 2017 18:08:18 GMT Subject: Re: [PATCHv3 2/2] builtin/commit.c: switch to xstrfmt(), instead of snprintf, Message-ID: <20170114180818.wrnltwwlypjmiuh3@sigill.intra.peff.net> In-Reply-To: <3165803b-6073-de97-bf33-71ad21108d6f@web.de> On Sat, Jan 14, 2017 at 05:31:39PM +0100, René Scharfe wrote: > Perhaps I missed it from the discussion, but why not use strbuf? It > would avoid counting the generated string's length. That's probably > not going to make a measurable difference performance-wise, but it's > easy to avoid and doesn't even take up more lines: It was mentioned in the review of the very first patch, but I think it just got dropped. I agree the strbuf way is nicer (not because of efficiency, but because it's simply easier to read and follow). -Peff