All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: "René Scharfe" <l.s.r@web.de>
Cc: Elia Pinto <gitter.spiros@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCHv3 2/2] builtin/commit.c: switch to xstrfmt(), instead of snprintf,
Date: Sat, 14 Jan 2017 13:08:18 -0500	[thread overview]
Message-ID: <20170114180818.wrnltwwlypjmiuh3@sigill.intra.peff.net> (raw)
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

      reply	other threads:[~2017-01-14 18:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13 17:58 [PATCHv3 1/2] builtin/commit.c: removes the PATH_MAX limitation via dynamic allocation Elia Pinto
2017-01-13 17:58 ` [PATCHv3 2/2] builtin/commit.c: switch to xstrfmt(), instead of snprintf, Elia Pinto
2017-01-13 18:33   ` Brandon Williams
2017-01-14 12:42     ` Elia Pinto
2017-01-15  2:42       ` Junio C Hamano
2017-01-15  8:13         ` Elia Pinto
2017-01-14 16:31   ` René Scharfe
2017-01-14 18:08     ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170114180818.wrnltwwlypjmiuh3@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitter.spiros@gmail.com \
    --cc=l.s.r@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.