On Thu, Aug 27, 2020 at 12:22 AM Jeff King <peff@xxxxxxxx> wrote: > I've actually considered dropping child_process.argv entirely. Having > two separate ways to do the same thing gives the potential for > confusion. [...] > > Likewise for child_process.env_array. builtin/worktree.c:add_worktree() is a case in which an environment strvec is built once and re-used for multiple run_command() invocations by re-assigning it to child_process.env before each run_command(). It uses child_process.env rather than child_process.env_array because run_command() clears child_process.env_array upon completion, which makes it difficult to reuse a prepared environment strvec repeatedly. Nevertheless, that isn't much of a reason to keep child_process.env. Refactoring add_worktree() a bit to rebuild the environment strvec on-demand wouldn't be very difficult.