config.c: remove last remnant of GIT_TEST_GETTEXT_POISON
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>
Ævar Arnfjörð Bjarmason committed
Apr 8, 2021 at 15:25 UTC
39e12650d71d5ecf195a31eb096ff1d140be2467
1 file changed
+1
-15
config.c
+1
-15
@@ -1180,20 +1180,6 @@ static void die_bad_number(const char *name, const char *value)
1180
}
1181
}
1182
1183
-NORETURN
1184
-static void die_bad_bool(const char *name, const char *value)
1185
-{
1186
- if (!strcmp(name, "GIT_TEST_GETTEXT_POISON"))
1187
- /*
1188
- * We explicitly *don't* use _() here since it would
1189
- * cause an infinite loop with _() needing to call
1190
- * use_gettext_poison().
1191
- */
1192
- die("bad boolean config value '%s' for '%s'", value, name);
1193
- else
1194
- die(_("bad boolean config value '%s' for '%s'"), value, name);
1195
-}
1196
-
1183
int git_config_int(const char *name, const char *value)
1184
{
1185
int ret;
@@ -1268,7 +1254,7 @@ int git_config_bool(const char *name, const char *value)
1254
{
1255
int v = git_parse_maybe_bool(value);
1256
if (v < 0)
1271
- die_bad_bool(name, value);
1257
+ die(_("bad boolean config value '%s' for '%s'"), value, name);
1258
return v;
1259
}
1260