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