summaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-05-31 14:48:47 +0200
committerSebastian Thiel <byronimo@gmail.com>2015-05-31 14:48:47 +0200
commit32e4e08cf9ccfa90f0bc6d26f0c7007aeafcffeb (patch)
treef71106b249623b08be59f71cb767bc8c7cd4db00 /git
parent1199f90c523f170c377bf7a5ca04c2ccaab67e08 (diff)
downloadgitpython-32e4e08cf9ccfa90f0bc6d26f0c7007aeafcffeb.tar.gz
fix(git-cmd): use LC_ALL instead of LC_MESSAGES
Previously, only program messages where forced to the C-locale, now we force the entire program. That way, we should assure a remote will not provide us with branch information in any other language but english. Related to #290
Diffstat (limited to 'git')
-rw-r--r--git/cmd.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/git/cmd.py b/git/cmd.py
index 429046be..ee35bbcf 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,9 @@ 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.
+ env["LC_ALL"] = "C"
env.update(self._environment)
if sys.platform == 'win32':