浏览代码

Merge pull request #329 from juanghurtado/master

Support for $(current_branch) on git_parse_ahead()
Robby Russell 14 年之前
父节点
当前提交
4f71818a8b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/git.zsh

+ 1 - 1
lib/git.zsh

@@ -15,7 +15,7 @@ parse_git_dirty() {
 
 # Checks if there are commits ahead from remote
 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"
   fi
 }