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

Re: [PATCH] submodule: use strvec_pushf() for --super-prefix

From
Jeff King <peff@peff.net>
Date
Oct 24, 2022, 23:50 UTC
Message-ID
<Y1ck2p6ykHRo5cCg@coredump.intra.peff.net>
In-Reply-To
<7a4e2fc6-3e01-5683-2be5-13b7e67c7fe5@web.de>
On Sun, Oct 23, 2022 at 08:47:35AM +0200, René Scharfe wrote:
Show 5 quoted lines
> absorb_git_dir_into_superproject() uses a strbuf and strvec_pushl() to
> build and add the --super-prefix option and its argument.  Use a single
> strvec_pushf() call to add the stuck form instead, which reduces the
> code size and avoids a strbuf allocation and release.  The same is
> already done in submodule_reset_index() and submodule_move_head().

Nice. Unlike some of the earlier discussion around child_process args, this one seems like a very clear win.

-Peff
Previous: René Scharfe
Message 2 of 2 in “submodule: use strvec_pushf() for --super-prefix”
  1. submodule: use strvec_pushf() for --super-prefixRené Scharfe, Oct 23, 2022
  2. Jeff KingOct 24, 2022

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.