mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-25 15:20:08 +00:00
Adds support for $(current_branch) on git_parse_ahead()
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.
This commit is contained in:
parent
a525993f6b
commit
e129fc5a28
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ parse_git_dirty() {
|
||||||
|
|
||||||
# Checks if there are commits ahead from remote
|
# Checks if there are commits ahead from remote
|
||||||
function git_prompt_ahead() {
|
function git_prompt_ahead() {
|
||||||
if $(echo "$(git log origin/master..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
|
if $(echo "$(git log origin/$(current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
|
||||||
echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
|
echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue