git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf

From
Jeff King <peff@peff.net>
Date
Aug 1, 2016, 16:49 UTC
Message-ID
<20160801164929.ezalmutcrc3erc22@sigill.intra.peff.net>
In-Reply-To
<579CE597.4060009@web.de>
On Sat, Jul 30, 2016 at 07:36:23PM +0200, René Scharfe wrote:
Show 6 quoted lines
> Replace uses of strbuf_addf() for adding strings with more lightweight
> strbuf_addstr() calls.
> 
> In http-push.c it becomes easier to see what's going on without having
> to verfiy that the definition of PROPFIND_ALL_REQUEST doesn't contain
> any format specifiers.

Nice. I care a lot less about whether "addf" or "addstr" is more efficient. But the second point, that it makes the intent clearer, is a big win.

-Peff
Previous: René ScharfeNext: Junio C Hamano
Message 2 of 3 in “use strbuf_addstr() for adding constant strings to a strbuf”
  1. use strbuf_addstr() for adding constant strings to a strbufRené Scharfe, Jul 30, 2016
  2. Jeff KingAug 1, 2016
  3. Junio C HamanoAug 1, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.