mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
This commit is contained in:
commit
3909306b7c
1 changed files with 7 additions and 0 deletions
|
|
@ -83,6 +83,13 @@ function git_commits_ahead() {
|
||||||
fi
|
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
|
# Outputs if current branch is ahead of remote
|
||||||
function git_prompt_ahead() {
|
function git_prompt_ahead() {
|
||||||
if [[ -n "$(command git rev-list origin/$(git_current_branch)..HEAD 2> /dev/null)" ]]; then
|
if [[ -n "$(command git rev-list origin/$(git_current_branch)..HEAD 2> /dev/null)" ]]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue