Skip to content

Improvements of code and functionality for the git prompt #972

wants to merge 4 commits into from

2 participants

  • '(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).
jgosmann added some commits Feb 25, 2012
@jgosmann jgosmann Display detached head state in git prompt. 8910f5d
@jgosmann jgosmann More detailed git prompt information.
Possibility to also display if a branch is behind, has diverged or is up-to-date.
Also changed the implementation to use git-rev-list which is a bit easier than
@jgosmann jgosmann Allow "staged" as result of parse_git_dirty().
If the corresponding parameter is not set "dirty" will be used as before.
@jgosmann jgosmann My theme, initial commit. 6daa2f1

This is a bit outdated now. Feel free to submit a revised pull-request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.