From 0dbac24bba7515a59636abab91d97187c597459c Mon Sep 17 00:00:00 2001 From: Kentaro Wada Date: Wed, 23 Sep 2015 17:19:47 +0900 Subject: [PATCH] Set LC_ALL=C at git status to make sure in English Fix https://github.com/magicmonty/bash-git-prompt/pull/170#issuecomment-142516122 --- gitstatus.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gitstatus.py b/gitstatus.py index 423619a..48d91f5 100755 --- a/gitstatus.py +++ b/gitstatus.py @@ -74,7 +74,8 @@ def get_stash(): # `git status --porcelain --branch` can collect all information # branch, remote_branch, untracked, staged, changed, conflicts, ahead, behind -po = Popen(['git', 'status', '--porcelain', '--branch'], stdout=PIPE, stderr=PIPE) +po = Popen(['git', 'status', '--porcelain', '--branch'], env={'LC_ALL': 'C'}, + stdout=PIPE, stderr=PIPE) stdout, sterr = po.communicate() if po.returncode != 0: sys.exit(0) # Not a git repository