summaryrefslogtreecommitdiff
path: root/git/cmd.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/cmd.py')
-rw-r--r--git/cmd.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/git/cmd.py b/git/cmd.py
index 429046be..87e482d8 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -530,7 +530,7 @@ class Git(LazyMixin):
* output_stream if extended_output = False
* tuple(int(status), output_stream, str(stderr)) if extended_output = True
- Note git is executed with LC_MESSAGES="C" to ensure consitent
+ Note git is executed with LC_MESSAGES="C" to ensure consistent
output regardless of system language.
:raise GitCommandError:
@@ -549,7 +549,12 @@ class Git(LazyMixin):
# Start the process
env = os.environ.copy()
- env["LC_MESSAGES"] = "C"
+ # Attempt to force all output to plain ascii english, which is what some parsing code
+ # may expect.
+ # According to stackoverflow (http://goo.gl/l74GC8), we are setting LANGUAGE as well
+ # just to be sure.
+ env["LANGUAGE"] = "C"
+ env["LC_ALL"] = "C"
env.update(self._environment)
if sys.platform == 'win32':