summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-Antoine Ruel <maruel@chromium.org>2013-08-27 11:38:57 -0400
committerMarc-Antoine Ruel <maruel@chromium.org>2013-08-27 11:38:57 -0400
commitfca62c16161c8b0bbcb215a4d0b6f21030113dcf (patch)
tree94201f2116db20c0786ae36b6212dccb4a88bf88
parentfixed: filenames with special chars (diff)
downloadgit-prompt-fca62c16161c8b0bbcb215a4d0b6f21030113dcf.tar.gz
git-prompt-fca62c16161c8b0bbcb215a4d0b6f21030113dcf.tar.bz2
git-prompt-fca62c16161c8b0bbcb215a4d0b6f21030113dcf.zip
Fix support for non English UI.
When git is localized, output is in the native language, so the regexp fails. Forces output to be in English.
-rwxr-xr-xgit-prompt.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-prompt.sh b/git-prompt.sh
index f99a1d0..8ab9103 100755
--- a/git-prompt.sh
+++ b/git-prompt.sh
@@ -431,7 +431,7 @@ parse_git_status() {
# info not in porcelain status
eval " $(
- git status 2>/dev/null |
+ LANG=C git status 2>/dev/null |
sed -n '
s/^# On branch /branch=/p
s/^nothing to commi.*/clean=clean/p
@@ -454,7 +454,7 @@ parse_git_status() {
# A "with space" <------------- WITH QOUTES
eval " $(
- git status --porcelain 2>/dev/null |
+ LANG=C git status --porcelain 2>/dev/null |
sed -n '
s,^[MARC]. \([^\"][^/]*/\?\).*, added=added; [[ \" ${added_files[@]} \" =~ \" \1 \" ]] || added_files[${#added_files[@]}]=\"\1\",p
s,^[MARC]. \"\([^/]\+/\?\).*\"$, added=added; [[ \" ${added_files[@]} \" =~ \" \1 \" ]] || added_files[${#added_files[@]}]=\"\1\",p