Re: [PATCH] perf: do allow `GIT_PERF_*` to be overridden again
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Apr 4, 2025, 12:13 UTC
- Message-ID
- <3bc8a906-ead6-4cce-9658-d45feb76cebf@gmail.com>
- In-Reply-To
- <pull.1900.git.1743764167548.gitgitgadget@gmail.com>
On 4/4/2025 6:56 AM, Johannes Schindelin via GitGitGadget wrote:
Show 9 quoted lines
> From: Johannes Schindelin <johannes.schindelin@gmx.de> > > A common way to run Git's performance benchmarks on repositories other > than Git's own repository (which is not exactly large when compared to > actually large repositories) is to run them like this: > > GIT_PERF_LARGE_REPO=/path/to/my/large/repo \ > ./p1234-*.sh -ivx >
This issue also extends to other necessary variables such as GIT_PERF_REPEAT_COUNT.
Show 13 quoted lines
> +# GIT-BUILD-OPTIONS, sourced by test-lib.sh, overwrites the `GIT_PERF_*`
> +# values that are set by the user (if any). Let's stash them away as
> +# `eval`-able assignments.
> +git_perf_settings="$(env |
> + sed -n "/^GIT_PERF_/{
> + # escape all single-quotes in the value
> + s/'/'\\\\''/g
> + # turn this into an eval-able assignment
> + s/^\\([^=]*=\\)\\(.*\\)/\\1'\\2'/p
> + }")"
> +
> . ../test-lib.sh
> +eval "$git_perf_settings"I verified this fix in my local environment. Thanks so much for digging in and finding the solution here!
-Stolee