From d5db4c03a16a9f4624583ca62fde48f7578ca544 Mon Sep 17 00:00:00 2001 From: Amand Tihon Date: Thu, 18 Dec 2014 11:14:34 +0100 Subject: [PATCH] Update git status parsing. --- S60_git | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/S60_git b/S60_git index 78c163c..1061cf5 100644 --- a/S60_git +++ b/S60_git @@ -34,20 +34,20 @@ git_get_status() { # Return only git status local gitstat gitstatus - gitstat=$(git status 2> /dev/null | grep '\(# Untracked\|# Changes\|# Changed but not updated:\)') + gitstat=$(LANG=C git status 2> /dev/null | grep '\(Untracked\|Changes\|Changed but not updated:\)') # 'fix for mcedit parser gitstatus="" - if [[ $(echo ${gitstat} | grep -c "^# Changes to be committed:$") > 0 ]]; then + if [[ $(echo ${gitstat} | grep -c "^Changes to be committed:$") > 0 ]]; then gitstatus='✚' fi - if [[ $(echo ${gitstat} | grep -c "^\# Changed but not updated:$") > 0 || \ - $(echo ${gitstat} | grep -c "^\# Changes not staged for commit:$") > 0 ]]; then + if [[ $(echo ${gitstat} | grep -c "^Changed but not updated:$") > 0 || \ + $(echo ${gitstat} | grep -c "^Changes not staged for commit:$") > 0 ]]; then gitstatus="${gitstatus}✹" fi - if [[ $(echo ${gitstat} | grep -c "^# Untracked files:$") > 0 ]]; then + if [[ $(echo ${gitstat} | grep -c "^Untracked files:$") > 0 ]]; then gitstatus="${gitstatus}★" fi -- 2.39.5