3cfcf5e0aa71bddcf7ab45d3880f142654f22266

Author
sheveko <28670374+sheveko@users.noreply.github.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

git-prompt: run git status with LANG=C (#6087)

As described in #6086 there will be an error when one set another
language than English.

Diff

 1diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py
 2index a4d07cde65e15824f0f042af4404aaa6b7966f9e..5243af23c80a46ffdfb41c243530dc1144c1f29c 100644
 3--- a/plugins/git-prompt/gitstatus.py
 4+++ b/plugins/git-prompt/gitstatus.py
 5@@ -30,7 +30,7 @@ def get_tagname_or_hash():
 6 
 7 # `git status --porcelain --branch` can collect all information
 8 # branch, remote_branch, untracked, staged, changed, conflicts, ahead, behind
 9-po = Popen(['git', 'status', '--porcelain', '--branch'], stdout=PIPE, stderr=PIPE)
10+po = Popen(['git', 'status', '--porcelain', '--branch'], env={"LANG": "C"}, stdout=PIPE, stderr=PIPE)
11 stdout, sterr = po.communicate()
12 if po.returncode != 0:
13     sys.exit(0)  # Not a git repository