git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Johannes Schindelin via GitGitGadgetNext: Jeff King
Message 2 of 6 in “perf: do allow `GIT_PERF_*` to be overridden again”
  1. perf: do allow `GIT_PERF_*` to be overridden againJohannes Schindelin via GitGitGadget, Apr 4, 2025
  2. Derrick StoleeApr 4, 2025
  3. Jeff KingApr 19, 2025
  4. Junio C HamanoApr 20, 2025
  5. Jeff KingApr 22, 2025
  6. Junio C HamanoApr 22, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.