mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
Merge 939bffe4e4 into 397c085a19
This commit is contained in:
commit
d31c1573c3
1 changed files with 3 additions and 4 deletions
|
|
@ -39,11 +39,10 @@ git_remote_status() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if there are commits ahead from remote
|
# Checks if there are commits ahead the upstream (the tracked remote branch)
|
||||||
function git_prompt_ahead() {
|
function git_prompt_ahead() {
|
||||||
if $(echo "$(git log origin/$(current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
|
local cherries=$(git cherry @{upstream}) 2> /dev/null
|
||||||
echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
|
[ $cherries ] && echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Formats prompt string for current git commit short SHA
|
# Formats prompt string for current git commit short SHA
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue