Thread (21 messages) 21 messages, 6 authors, 2022-06-03

Re: ab/run-command (was: What's cooking in git.git (Dec 2021, #04; Wed, 15))

flat view

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-12-16 15:41:48

On Thu, Dec 16 2021, Jeff King wrote:
On Thu, Dec 16, 2021 at 12:51:55PM +0100, Ævar Arnfjörð Bjarmason wrote:
quoted
Or maybe you're not interested in either case, which is also fine. It's
really not needed for anything other than to resolve the minor oddity
that we have two "struct strvec"'s, "args" and "env_array". It's just a
bit odd to have one with "_array" in the name, which is only because the
now-removed "env" was taken at the time.
Yeah, FWIW I absolutely hated "env_array" when I added it, but didn't
want to do the transition all at once, so needed another name. So I
would be happy to see it become "env" now. ;)
Thanks.
Turning "args" into "argv" is less important, just because the name is
less long and ugly. And since "argv" is both the concept of the arg list
and also the well-known main() parameter with a different type, arguably
using it for a type besides "const char **" could be confusing (though I
don't find it so personally).
I like that it's just "args", so I don't think I'd change it even if I
could waive the proverbial magic wand to d oit.

We also have non-run-command.h code that uses "struct strvec args =
STRVEC_INIT" (although most of that ends up being passed into the
run_command.c function).

Saying "argv.v" also seems a bit more strange than "args.v", IMO.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help