From ece61f346ea8543421b3361064a9d228ffe8a7ae Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Fri, 1 Jul 2016 11:47:13 +0200 Subject: [PATCH] Try to resolve symlinks for git --- autoload/airline/extensions/branch.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/airline/extensions/branch.vim b/autoload/airline/extensions/branch.vim index 422a65ce..842f023b 100644 --- a/autoload/airline/extensions/branch.vim +++ b/autoload/airline/extensions/branch.vim @@ -117,7 +117,11 @@ function! airline#extensions#branch#head() let l:vcs_priority = get(g:, "airline#extensions#branch#vcs_priority", ["git", "mercurial"]) let found_fugitive_head = 0 - let l:git_head = s:get_git_branch(expand("%:p:h")) + if exists("*fnamemodify") + let l:git_head = s:get_git_branch(fnamemodify(resolve(@%), ":p:h")) + else + let l:git_head = s:get_git_branch(expand("%:p:h")) + endif let l:hg_head = s:get_hg_branch() if !empty(l:git_head)