]> git.ipfire.org Git - thirdparty/git.git/commitdiff
config.c: remove last remnant of GIT_TEST_GETTEXT_POISON
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 8 Apr 2021 13:25:55 +0000 (15:25 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Apr 2021 17:54:08 +0000 (10:54 -0700)
Remove a use of GIT_TEST_GETTEXT_POISON added in f276e2a4694 (config:
improve error message for boolean config, 2021-02-11).

This was simultaneously in-flight with my d162b25f956 (tests: remove
support for GIT_TEST_GETTEXT_POISON, 2021-01-20) which removed the
rest of the GIT_TEST_GETTEXT_POISON code.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c

index 6428393a4143b7cd9060e31dea039b639b5db22d..870d9534defc61c7424fcb3d817769c1ec342652 100644 (file)
--- a/config.c
+++ b/config.c
@@ -1180,20 +1180,6 @@ static void die_bad_number(const char *name, const char *value)
        }
 }
 
-NORETURN
-static void die_bad_bool(const char *name, const char *value)
-{
-       if (!strcmp(name, "GIT_TEST_GETTEXT_POISON"))
-               /*
-                * We explicitly *don't* use _() here since it would
-                * cause an infinite loop with _() needing to call
-                * use_gettext_poison().
-                */
-               die("bad boolean config value '%s' for '%s'", value, name);
-       else
-               die(_("bad boolean config value '%s' for '%s'"), value, name);
-}
-
 int git_config_int(const char *name, const char *value)
 {
        int ret;
@@ -1268,7 +1254,7 @@ int git_config_bool(const char *name, const char *value)
 {
        int v = git_parse_maybe_bool(value);
        if (v < 0)
-               die_bad_bool(name, value);
+               die(_("bad boolean config value '%s' for '%s'"), value, name);
        return v;
 }