robbyrussell/oh-my-zsh — pull request #1389 by andreadelfino (2012-11-03 18:28:17+00:00)
Title: Added git_prompt_behind() function

Added `git_prompt_behind()` function for checks if there are commits behind from remote and set `ZSH_THEME_GIT_PROMPT_BEHIND` variable, so themes can do something like that:

```shell
## Git prompt behind
ZSH_THEME_GIT_PROMPT_BEHIND="↓"

## Git prompt ahead
ZSH_THEME_GIT_PROMPT_AHEAD="↑"
```

and use the function for `PROMPT` composition:

```shell
## Wrap multiple prompt infos
function git_prompt_info_plus() {
echo "$(git_prompt_ahead)$(git_prompt_behind)$(git_prompt_status)"
}
```
I hope it can be useful to someone.