]> git.ipfire.org Git - thirdparty/git.git/blobdiff - gettext.c
do_read_index(): always mark index as initialized unless erroring out
[thirdparty/git.git] / gettext.c
index bb5ba1fe7cc5979255fe79fd8dfc0085fc8df8f1..e81357f9ba50a2a02ed2811b198a7039fcaaa46d 100644 (file)
--- a/gettext.c
+++ b/gettext.c
@@ -10,7 +10,6 @@
 #include "config.h"
 
 #ifndef NO_GETTEXT
-#      include <locale.h>
 #      include <libintl.h>
 #      ifdef GIT_WINDOWS_NATIVE
 
@@ -80,7 +79,6 @@ static int test_vsnprintf(const char *fmt, ...)
 
 static void init_gettext_charset(const char *domain)
 {
-       setlocale(LC_CTYPE, "");
        charset = locale_charset();
        bind_textdomain_codeset(domain, charset);
 
@@ -102,6 +100,8 @@ static void init_gettext_charset(const char *domain)
                setlocale(LC_CTYPE, "C");
 }
 
+int git_gettext_enabled = 0;
+
 void git_setup_gettext(void)
 {
        const char *podir = getenv(GIT_TEXT_DOMAIN_DIR_ENVIRONMENT);
@@ -121,6 +121,8 @@ void git_setup_gettext(void)
        init_gettext_charset("git");
        textdomain("git");
 
+       git_gettext_enabled = 1;
+
        free(p);
 }