Fix GitPython on systems with language != english#68
Fix GitPython on systems with language != english#68Byron merged 1 commit intogitpython-developers:masterfrom
Conversation
|
Out of curiosity, what does setting it to 'C' do exactly that makes this work? |
|
See for example: http://superuser.com/questions/219945/why-lang-c-not-d-or-e-or-f To my knowledge "C" always gives you untranslated strings and so on every system the same; also important when parsing dates etc. So you get the English output from git. By using "C" instead of say en_US.utf8 I hoped to avoid using a LANG that might be unavailable. |
|
Thanks for the explanation. My quick search this morning didn't come up with much and then I had to walk to work. |
|
Thank you very much for pointing this out. Its quite amazing that I as a german dude never noticed it on my various english operating systems :). Besides that, do you think you can create another pull request for the 0.3 branch ? The code there would probably have the same problem. In any way, thanks a lot, |
Fix GitPython on systems with language != english
Currently GitPython only works on systems with language set to English. If the language is set to any other it fails silently.
This pull request provides a simple fix by settings the environment variable LANG to "C" for subprocess calls to the git executable.