now that git_prompt_ahead() works more consistenly and doesn't insist on
the remote being called 'origin', we can actually include
git_prompt_ahead() in the default prompt.
git_prompt_ahead() makes use of ZSH_THEME_GIT_PROMPT_AHEAD which is
currently unused, but can now be used to show if your branch is ahead of
the one you are tracking
it's possible that you are working on a tracking branch that tracks
something else than origin.
This uses the new git_current_upstream() function to determine the
remote of the branch that is currently being tracked
Changes method git_parse_ahead() on git.zsh lib file. Before this
change it checked directly against origin/master branch. Now it
uses $(current_branch) to check for not pushed changes against
the current remote branch.
Modifies the Git lib file (lib/git.zsh), adding three new prompt
methods:
- git_prompt_ahead(): Shows the content of the custom var
$ZSH_THEME_GIT_PROMPT_AHEAD if the local repository has
commits ahead from the remote origin repository
- git_prompt_short_sha(): Shows last commit SHA hash in short
mode wrapped between the content of the custom vars
$ZSH_THEME_GIT_PROMPT_SHA_BEFORE and
$ZSH_THEME_GIT_PROMPT_SHA_AFTER
- git_prompt_long_sha(): Shows last commit SHA hash in long
mode wrapped between the content of the custom vars
$ZSH_THEME_GIT_PROMPT_SHA_BEFORE and
$ZSH_THEME_GIT_PROMPT_SHA_AFTER