aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2018-11-03 05:10:53 +0300
committerDominik Ritter <dritter03@googlemail.com>2018-11-03 05:10:53 +0300
commit9a67ca5bc37a0dc6a397e59fb89b8565fcb468c4 (patch)
tree463835fc2217986c3081188e1322f714d9752a5f /functions
parentfea5f616d17b11446a48327b6719180adf577425 (diff)
Get branch name from VCS_INFO subsystem when collecting remote branch
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/vcs.zsh4
1 files changed, 2 insertions, 2 deletions
diff --git a/functions/vcs.zsh b/functions/vcs.zsh
index 50a77d49..23b2b661 100755
--- a/functions/vcs.zsh
+++ b/functions/vcs.zsh
@@ -43,11 +43,11 @@ function +vi-git-aheadbehind() {
}
function +vi-git-remotebranch() {
- local remote branch_name
+ local remote
+ local branch_name="${hook_com[branch]}"
# Are we on a remote-tracking branch?
remote=${$(command git rev-parse --verify HEAD@{upstream} --symbolic-full-name 2>/dev/null)/refs\/(remotes|heads)\/}
- branch_name=$(command git symbolic-ref --short HEAD 2>/dev/null)
if [[ -n "$POWERLEVEL9K_VCS_SHORTEN_LENGTH" ]] && [[ -n "$POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH" ]]; then
set_default POWERLEVEL9K_VCS_SHORTEN_DELIMITER $'\U2026'