Re: [PATCH] submodule--helper: use strvec_pushf() for --super-prefix
- From
Jeff King <peff@peff.net>
- Date
- Jul 1, 2024, 03:42 UTC
- Message-ID
- <20240701034220.GD610406@coredump.intra.peff.net>
- In-Reply-To
- <fb79ebc4-5ecf-4257-ac2e-39f98db5649c@web.de>
On Sat, Jun 29, 2024 at 08:01:24PM +0200, René Scharfe wrote:
Show 5 quoted lines
> Use the strvec_pushf() call that already appends a slash to also produce > the stuck form of the option --super-prefix instead of adding the option > name in a separate call of strvec_push() or strvec_pushl(). This way we > can more easily see that these parts make up a single option with its > argument and save a function call.
I agree it's more readable (both the code and any GIT_TRACE output). But also I think the "stuck" form is what we recommend in gitcli(7), since it is future-proof against optional arguments. So we'd also be setting a good example.
-Peff