fix for when we are multiple commits ahead of origin

This commit is contained in:
Donald Stufft 2011-07-27 02:59:31 -04:00
commit f43523f6ed

View file

@ -18,6 +18,7 @@ function git_ahead {
AHEAD=$(echo "$GITSTATUS" | grep '^# Your branch is ahead of' 2> /dev/null)
if [[ -n $AHEAD ]]; then
AHEAD=${AHEAD##\# Your branch is ahead of * by }
AHEAD=${AHEAD%% commits.}
AHEAD=${AHEAD%% commit.}
echo "^%{$fg[magenta]%}"$AHEAD"%{$reset_color%}"
fi