]> git.ipfire.org Git - thirdparty/git.git/blobdiff - gettext.c
t4039: abstract away SHA-1-specific constants
[thirdparty/git.git] / gettext.c
index 3f2aca5c3b16d39375fab9b6203c67ae16209023..35d2c1218db2e27a6ac07fbf3c1244987e3e3021 100644 (file)
--- a/gettext.c
+++ b/gettext.c
@@ -68,10 +68,8 @@ const char *get_preferred_languages(void)
 int use_gettext_poison(void)
 {
        static int poison_requested = -1;
-       if (poison_requested == -1) {
-               const char *v = getenv("GIT_TEST_GETTEXT_POISON");
-               poison_requested = v && strlen(v) ? 1 : 0;
-       }
+       if (poison_requested == -1)
+               poison_requested = git_env_bool("GIT_TEST_GETTEXT_POISON", 0);
        return poison_requested;
 }