Re: [PATCH v3 2/5] setup: allow for prefix to be passed to git commands
- From
Stefan Beller <sbeller@google.com>
- Date
- Mar 28, 2017, 23:58 UTC
- Message-ID
- <CAGZ79kbCxhs82PD7wiB6UXh2=5k_EfnFYTZYqUs-FJU2WuxDxg@mail.gmail.com>
- In-Reply-To
- <20170320223418.GB188475@google.com>
On Mon, Mar 20, 2017 at 3:34 PM, Brandon Williams <bmwill@google.com> wrote:
> That the gist of how I'm hoping to solve the problem. Hopefully that was > clear enough to get some feedback on.
Junio wrote in "What's cooking in git.git (Mar 2017, #10; Fri, 24)"
> I saw no particular issues myself. Do others find this series good > (not just "meh--it is harmless" but I want to hear a positive "yes > these are good changes")?
So I reviewed them again, and I think they are good to go. As a followup we may want to consider this
diff --git a/setup.c b/setup.c index 56cd68ba93..bdc294091a 100644 --- a/setup.c +++ b/setup.c @@ -944,6 +944,10 @@ const char *setup_git_directory_gently(int *nongit_ok) prefix = setup_git_directory_gently_1(nongit_ok); env_prefix = getenv(GIT_TOPLEVEL_PREFIX_ENVIRONMENT); + if (prefix && env_prefix) + die("BUG: can't invoke command in sub directory with %s set", + GIT_TOPLEVEL_PREFIX_ENVIRONMENT); + if (env_prefix) prefix = env_prefix; -- Thanks, Stefan