From: Jeff King Date: Mon, 02 Mar 2026 18:06:01 GMT Subject: Re: [PATCH v3 3/4] for-each-repo: work correctly in a worktree Message-ID: <20260302180601.GD28275@coredump.intra.peff.net> In-Reply-To: <2a6091095f120426fed554a08871f2b4dcd15282.1772465805.git.gitgitgadget@gmail.com> On Mon, Mar 02, 2026 at 03:36:44PM +0000, Derrick Stolee via GitGitGadget wrote: > @@ -15,10 +16,11 @@ static const char * const for_each_repo_usage[] = { > > static int run_command_on_repo(const char *path, int argc, const char ** argv) > { > - int i; > struct child_process child = CHILD_PROCESS_INIT; > char *abspath = interpolate_path(path, 0); > > + clear_local_repo_env(&child.env); > + > child.git_cmd = 1; > strvec_pushl(&child.args, "-C", abspath, NULL); The second part of the hunk here is as expected, but the first one looks wrong. We didn't remove any references to "i", so either it was redundant to start with (and the compiler should have complained), or now we've broken compilation. Looks like the latter, but we recover when we switch to using pushv in patch 4. So I think the declaration of "i" should move to that patch. -Peff