diff options
Diffstat (limited to 'hyperterm/core/git.sh')
-rw-r--r-- | hyperterm/core/git.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hyperterm/core/git.sh b/hyperterm/core/git.sh index 616e158..9b2ee5a 100644 --- a/hyperterm/core/git.sh +++ b/hyperterm/core/git.sh @@ -146,10 +146,13 @@ function _git_dirty_count() { fi } -___upstream="$(git rev-parse --symbolic-full-name --abbrev-ref "@{upstream}" 2> /dev/null)" +function _git_upstream() { + ___upstream="$(git rev-parse --symbolic-full-name --abbrev-ref "@{upstream}" 2> /dev/null)" +} function _git_behind_count() { local __behind_count + _git_upstream if [[ -n $___upstream ]]; then __behind_count="$(git rev-list --left-right --count "$___upstream"...HEAD | cut -f1 2> /dev/null)" case $__behind_count in @@ -161,6 +164,7 @@ function _git_behind_count() { function _git_ahead_count() { local __ahead_count + _git_upstream if [[ -n $___upstream ]]; then __ahead_count="$(git rev-list --left-right --count "$___upstream"...HEAD | cut -f2 2> /dev/null)" case $__ahead_count in |