From: Junio C Hamano Date: Fri, 2 Mar 2018 20:18:30 +0000 (-0800) Subject: Merge branch 'rs/perf-repeat-thrice-by-default' into next X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/4898b3c450d83795cca52b1af4ecc935a1c7de4b?hp=623461b127ce7633731f0e741a246ceb1f1a2238 Merge branch 'rs/perf-repeat-thrice-by-default' into next Perf test regression fix. * rs/perf-repeat-thrice-by-default: perf: use GIT_PERF_REPEAT_COUNT=3 by default even without config file --- diff --git a/t/perf/run b/t/perf/run index 1a100d6134..213da5d6b9 100755 --- a/t/perf/run +++ b/t/perf/run @@ -106,7 +106,6 @@ get_var_from_env_or_config () { conf_sec="$2" conf_var="$3" conf_opts="$4" # optional - # $5 can be set to a default value # Do nothing if the env variable is already set eval "test -z \"\${$env_var+x}\"" || return @@ -122,13 +121,12 @@ get_var_from_env_or_config () { fi var="$conf_sec.$conf_var" conf_value=$(git config $conf_opts -f "$GIT_PERF_CONFIG_FILE" "$var") && - eval "$env_var=\"$conf_value\"" && return - - test -n "${5+x}" && eval "$env_var=\"$5\"" + eval "$env_var=\"$conf_value\"" } run_subsection () { - get_var_from_env_or_config "GIT_PERF_REPEAT_COUNT" "perf" "repeatCount" "--int" 3 + get_var_from_env_or_config "GIT_PERF_REPEAT_COUNT" "perf" "repeatCount" "--int" + : ${GIT_PERF_REPEAT_COUNT:=3} export GIT_PERF_REPEAT_COUNT get_var_from_env_or_config "GIT_PERF_DIRS_OR_REVS" "perf" "dirsOrRevs"