From: Jonathan Nieder Date: Thu, 25 Feb 2016 23:35:13 GMT Subject: Re: [PATCHv18 00/11] Expose Message-ID: <20160225233513.GV28749@google.com> In-Reply-To: Stefan Beller wrote: > On Thu, Feb 25, 2016 at 3:19 PM, Jonathan Nieder wrote: > > Now that I look around more, it seems that other submodule--helper subcommands > > have the same strange behavior of overwriting the 'prefix' var. So I take > > back my suggestion of using a different variable --- that can be addressed in a > > separate patch that deals with them all at once. [...] > I plan to fix that up in all the submodule--helper commands once this > long running series is in, > but for now we want to keep it consistently awkward? Exactly. > I plan to replace that to be > > git -C $wt_prefix submodule--helper > > which then doesn't carry a prefix option, but can rely on the prefix from its function > signature. Interesting --- git sets a GIT_PREFIX environment variable (in the same spirit as GIT_WORK_TREE) but doesn't read it. Using -C is probably the simplest way to go. Thanks, Jonathan