3c485db8c73bfebf379f3e9382eb8f300b608bd8
- Author
- r3dDoX <patrick@walther-online.ch>
- Committer
- r3dDoX <patrick@walther-online.ch>
- Date
Message
replaced hardcoded origin/{branch-name} with @{upstream} which gets the upstream branch since git 1.7.0
Diff
1diff --git a/lib/git.zsh b/lib/git.zsh
2index 305a77aff087716a9148ea0b2aa40012e989109e..3eca8a6c6aed44aaf6a7f08d397c367a69d6ccec 100644
3--- a/lib/git.zsh
4+++ b/lib/git.zsh
5@@ -54,7 +54,7 @@ git_remote_status() {
6
7 # Checks if there are commits ahead from remote
8 function git_prompt_ahead() {
9- if $(echo "$(command git log origin/$(current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
10+ if $(echo "$(command git log @{upstream}..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
11 echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
12 fi
13 }