Re: [PATCH v3 2/5] setup: allow for prefix to be passed to git commands
- From
Stefan Beller <sbeller@google.com>
- Date
- Mar 17, 2017, 19:07 UTC
- Message-ID
- <CAGZ79kZAZeb5rsL80dty_tRM5SDCAXVq_yATpDQREq_vV4Yj+Q@mail.gmail.com>
- In-Reply-To
- <20170317172257.4690-3-bmwill@google.com>
Show 8 quoted lines
> prefix = setup_git_directory_gently_1(nongit_ok); > + env_prefix = getenv(GIT_TOPLEVEL_PREFIX_ENVIRONMENT); > + > + if (env_prefix) > + prefix = env_prefix; > + > if (prefix) > setenv(GIT_PREFIX_ENVIRONMENT, prefix, 1);
so we load that GIT_TOPLEVEL_PREFIX_ENVIRONMENT prefix first, such that we essentially copy it into GIT_PREFIX_ENVIRONMENT, such that e.g. aliased commands will know about the superprefix, too.
ok, sounds reasonable to me; though I do not use this feature, so my judgement is not as good.
Do we need a test for this behavior?
Thanks, Stefan