Corret LC_ALL setting in git branch.

This commit is contained in:
Anthony Gelibert 2013-09-24 22:40:19 +02:00 committed by Olivier Mengué
parent da940677ee
commit b87e0c0f9f

View File

@ -743,7 +743,7 @@ _lp_git_branch_color()
local end local end
end="$NO_COL" end="$NO_COL"
if \git status 2>/dev/null | grep -q '\(# Untracked\)'; then if LC_ALL=C \git status 2>/dev/null | grep -q '\(# Untracked\)'; then
end="$LP_COLOR_CHANGES$LP_MARK_UNTRACKED$end" end="$LP_COLOR_CHANGES$LP_MARK_UNTRACKED$end"
fi fi
@ -768,7 +768,7 @@ _lp_git_branch_color()
fi fi
local shortstat local shortstat
shortstat="$(LANG=C \git diff --shortstat HEAD 2>/dev/null)" shortstat="$(LC_ALL=C \git diff --shortstat HEAD 2>/dev/null)"
if [[ -n "$shortstat" ]] ; then if [[ -n "$shortstat" ]] ; then
local has_lines local has_lines
#has_lines=$(\git diff --numstat 2>/dev/null | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d/-%d\n", plus, minus)}') #has_lines=$(\git diff --numstat 2>/dev/null | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d/-%d\n", plus, minus)}')