зеркало из https://github.com/microsoft/git.git
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
This commit is contained in:
Коммит
74735c9ca7
|
@ -106,7 +106,6 @@ get_var_from_env_or_config () {
|
||||||
conf_sec="$2"
|
conf_sec="$2"
|
||||||
conf_var="$3"
|
conf_var="$3"
|
||||||
conf_opts="$4" # optional
|
conf_opts="$4" # optional
|
||||||
# $5 can be set to a default value
|
|
||||||
|
|
||||||
# Do nothing if the env variable is already set
|
# Do nothing if the env variable is already set
|
||||||
eval "test -z \"\${$env_var+x}\"" || return
|
eval "test -z \"\${$env_var+x}\"" || return
|
||||||
|
@ -122,13 +121,12 @@ get_var_from_env_or_config () {
|
||||||
fi
|
fi
|
||||||
var="$conf_sec.$conf_var"
|
var="$conf_sec.$conf_var"
|
||||||
conf_value=$(git config $conf_opts -f "$GIT_PERF_CONFIG_FILE" "$var") &&
|
conf_value=$(git config $conf_opts -f "$GIT_PERF_CONFIG_FILE" "$var") &&
|
||||||
eval "$env_var=\"$conf_value\"" && return
|
eval "$env_var=\"$conf_value\""
|
||||||
|
|
||||||
test -n "${5+x}" && eval "$env_var=\"$5\""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run_subsection () {
|
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
|
export GIT_PERF_REPEAT_COUNT
|
||||||
|
|
||||||
get_var_from_env_or_config "GIT_PERF_DIRS_OR_REVS" "perf" "dirsOrRevs"
|
get_var_from_env_or_config "GIT_PERF_DIRS_OR_REVS" "perf" "dirsOrRevs"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче