Skip to content

perf: do allow GIT_PERF_* to be overridden again #1900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions t/perf/perf-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,19 @@ TEST_OUTPUT_DIRECTORY=$(pwd)
TEST_NO_CREATE_REPO=t
TEST_NO_MALLOC_CHECK=t

# 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"

unset GIT_CONFIG_NOSYSTEM
GIT_CONFIG_SYSTEM="$TEST_DIRECTORY/perf/config"
Expand Down
Loading