robbyrussell/oh-my-zsh — pull request #972 by jgosmann (2012-02-25 22:27:55+00:00)
Title: Improvements of code and functionality for the git prompt

* '(no branch)' is used as branch name in detached head state instead of not displaying the git prompt.
* Possibility to display if a branch is behind the remote tracking branch or has diverged from it. (Displaying if it is ahead is already possible.) Also simplified the implementation for this.
* Added $ZSH_THEME_GIT_PROMPT_STAGED which will be used by git_prompt_dirty() in case changes have been staged to the index. If it is not set, it will still $ZSH_THEME_GIT_PROMPT_DIRTY be used (don't want to break any existing themes).