pr-git-841/KlotzAndrew/better_bool_errors-v1
tagged this
18 Sep 02:17
Currently invalid boolean config values return messages about 'bad numeric', which I found misleading when the error was due to a boolean string value. This change makes the error message reflect the boolean value. The current approach relies on GIT_TEST_GETTEXT_POISON being a boolean value, moving its special case out fromdie_bad_number() and into git_config_bool_or_int(). An alternative could be for die_bad_number() to handle boolean values when erroring, although the function name might need to change if it is handling non-numeric values. Signed-off-by: Andrew Klotz agc.klotz@gmail.com [agc.klotz@gmail.com] Andrew Klotz (2): config: improve error message for boolean config formatting for error messages config.c | 26 ++++++++++++++------------ t/t0205-gettext-poison.sh | 2 +- 2 files changed, 15 insertions(+), 13 deletions(-) base-commit: 3a238e539bcdfe3f9eb5010fd218640c1b499f7a Submitted-As: https://lore.kernel.org/git/pull.841.git.git.1600395427.gitgitgadget@gmail.com
Assets 2
-
2020-09-18T02:17:07Z -
2020-09-18T02:17:07Z - Loading