aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-04-29 14:21:26 -0700
committerJunio C Hamano <gitster@pobox.com>2025-04-29 14:21:26 -0700
commit8bb81ccfad03ee06a88b9acebba61823bd459999 (patch)
treeb5be5294bb6c8db39ab150fcc0d80c4d3bb2475e /t
parentf65182a99e545d2f2bc22e6c1c2da192133b16a3 (diff)
parent32b74b9809cd2ddd38921eb59b92e4a5047a1eae (diff)
downloadgit-8bb81ccfad03ee06a88b9acebba61823bd459999.tar.xz
Merge branch 'js/git-perf-env-override'
Developer support fix.. * js/git-perf-env-override: perf: do allow `GIT_PERF_*` to be overridden again
Diffstat (limited to 't')
-rw-r--r--t/perf/perf-lib.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh
index 8ab6d9c469..39c3728445 100644
--- a/t/perf/perf-lib.sh
+++ b/t/perf/perf-lib.sh
@@ -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"