- local upstream_str
- (( ahead > 0 )) && upstream_str+="%{$fg[blue]%} >$ahead"
- (( behind > 0 )) && upstream_str+="%{$fg[blue]%} <$behind"
- git_status+="$upstream_str"
+ git_status+="%{$fg[blue]%}"
+ [[ -z "$upstream" ]] && git_status+=" Ɇ"
+ (( ahead > 0 )) && git_status+=" >$ahead"
+ (( behind > 0 )) && git_status+=" <$behind"
+
+ # Format push
+ git_status+="%{$fg_bold[blue]%}"
+ push_ab=( $(git rev-list --left-right --count @...@{push} 2>/dev/null) )
+ if (( $? == 0 )); then
+ (( push_ab[1] > 0 )) && git_status+=" ⮝$push_ab[1]"
+ (( push_ab[2] > 0 )) && git_status+=" ⮟$push_ab[2]"
+ fi