Skip to content

Commit 74735c9

Browse files
committed
Merge branch 'rs/perf-repeat-thrice-by-default'
Perf test regression fix. * rs/perf-repeat-thrice-by-default: perf: use GIT_PERF_REPEAT_COUNT=3 by default even without config file
2 parents cd3d56a + 53ba2c7 commit 74735c9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

t/perf/run

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ get_var_from_env_or_config () {
106106
conf_sec="$2"
107107
conf_var="$3"
108108
conf_opts="$4" # optional
109-
# $5 can be set to a default value
110109

111110
# Do nothing if the env variable is already set
112111
eval "test -z \"\${$env_var+x}\"" || return
@@ -122,13 +121,12 @@ get_var_from_env_or_config () {
122121
fi
123122
var="$conf_sec.$conf_var"
124123
conf_value=$(git config $conf_opts -f "$GIT_PERF_CONFIG_FILE" "$var") &&
125-
eval "$env_var=\"$conf_value\"" && return
126-
127-
test -n "${5+x}" && eval "$env_var=\"$5\""
124+
eval "$env_var=\"$conf_value\""
128125
}
129126

130127
run_subsection () {
131-
get_var_from_env_or_config "GIT_PERF_REPEAT_COUNT" "perf" "repeatCount" "--int" 3
128+
get_var_from_env_or_config "GIT_PERF_REPEAT_COUNT" "perf" "repeatCount" "--int"
129+
: ${GIT_PERF_REPEAT_COUNT:=3}
132130
export GIT_PERF_REPEAT_COUNT
133131

134132
get_var_from_env_or_config "GIT_PERF_DIRS_OR_REVS" "perf" "dirsOrRevs"

0 commit comments

Comments
 (0)