This commit is contained in:
Werner Freund 2016-07-25 08:28:40 -03:00
commit 3d87ba204e
8 changed files with 259 additions and 115 deletions

View file

@ -83,6 +83,13 @@ function git_commits_ahead() {
fi
}
# Gets the number of commits behind remote
function git_commits_behind() {
if $(command git rev-parse --git-dir > /dev/null 2>&1); then
echo $(git rev-list --count HEAD..@{upstream})
fi
}
# Outputs if current branch is ahead of remote
function git_prompt_ahead() {
if [[ -n "$(command git rev-list origin/$(git_current_branch)..HEAD 2> /dev/null)" ]]; then