i18n: factorize "invalid value" messages

Use the same message when an invalid value is passed to a command line
option or a configuration variable.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jean-Noël Avila
2022-01-31 22:07:47 +00:00
committed by Junio C Hamano
parent a699367bb8
commit 1a8aea857e
15 changed files with 30 additions and 25 deletions

View File

@ -39,8 +39,8 @@ void get_parallel_checkout_configs(int *num_workers, int *threshold)
if (env_workers && *env_workers) {
if (strtol_i(env_workers, 10, num_workers)) {
die("invalid value for GIT_TEST_CHECKOUT_WORKERS: '%s'",
env_workers);
die(_("invalid value for '%s': '%s'"),
"GIT_TEST_CHECKOUT_WORKERS", env_workers);
}
if (*num_workers < 1)
*num_workers = online_cpus();