Correct a bug in git parsing.

This commit is contained in:
Anthony Gelibert 2013-09-24 22:37:28 +02:00 committed by Olivier Mengué
parent 141131502a
commit da940677ee

View File

@ -768,7 +768,7 @@ _lp_git_branch_color()
fi
local shortstat
shortstat="$(LANG=C \git diff --shortstat 2>/dev/null)"
shortstat="$(LANG=C \git diff --shortstat HEAD 2>/dev/null)"
if [[ -n "$shortstat" ]] ; then
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)}')