From: Junio C Hamano Date: Tue, 22 Apr 2025 15:37:02 GMT Subject: Re: [PATCH] perf: do allow `GIT_PERF_*` to be overridden again Message-ID: In-Reply-To: <20250422104125.GA1460472@coredump.intra.peff.net> Jeff King writes: > The original patch in this thread did something like: > > git_perf_settings=$(...pull GIT_PERF_* from env...) > . ../test-lib.sh > eval "$git_perf_settings" > > That is, we stash away the environment, then load test-lib.sh, which > overwrites the environment, and then we restore (some of) the original > values. > > In that merge, the test-lib.sh inclusion is moved (and in fact is now > accompanied by an explicit inclusion of GIT-BUILD-OPTIONS), and we now > have: > > . "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS > . "$GIT_SOURCE_DIR"/t/test-lib.sh > git_perf_settings=$(...) > eval "$git_perf_settings" > > Which of course does nothing. We need to set $git_perf_settings before > those other source lines (and the eval must remain after them). Right. Thanks.