mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-24 06:25:31 +02:00
Merge pull request #1202 from chrisbra/resolve_symlink
Try to resolve symlinks for git
This commit is contained in:
commit
c6f5d8b823
@ -117,7 +117,11 @@ function! airline#extensions#branch#head()
|
|||||||
let l:vcs_priority = get(g:, "airline#extensions#branch#vcs_priority", ["git", "mercurial"])
|
let l:vcs_priority = get(g:, "airline#extensions#branch#vcs_priority", ["git", "mercurial"])
|
||||||
let found_fugitive_head = 0
|
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()
|
let l:hg_head = s:get_hg_branch()
|
||||||
|
|
||||||
if !empty(l:git_head)
|
if !empty(l:git_head)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user