4f71818a8b5e6e4901c2534066e827f045bd8d25

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #329 from juanghurtado/master

Support for $(current_branch) on git_parse_ahead()

Diff

 1diff --git a/lib/git.zsh b/lib/git.zsh
 2index e96f075beeb7efcfc23c6b7520bf7bc46e1e9430..2ace3d0e0ff7fab9514dda73d24f4f9c83aed2cd 100644
 3--- a/lib/git.zsh
 4+++ b/lib/git.zsh
 5@@ -15,7 +15,7 @@ parse_git_dirty() {
 6 
 7 # Checks if there are commits ahead from remote
 8 function git_prompt_ahead() {
 9-  if $(echo "$(git log origin/master..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
10+  if $(echo "$(git log origin/$(current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
11     echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
12   fi
13 }