mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-10 20:43:46 -05:00
Remove dead code for resolving symlinked buffer name
The `:p` flag resolves symlinks, so the resolve() call is a no-op, and the subsequent conditional is always false. It also appears to be no longer necessary, though I'd have to do a bit more digging to figure out why.
This commit is contained in:
@@ -416,18 +416,12 @@ function! FugitiveExtractGitDir(path) abort
|
|||||||
return get(matchlist(path, s:dir_commit_file), 1, '')
|
return get(matchlist(path, s:dir_commit_file), 1, '')
|
||||||
elseif empty(path)
|
elseif empty(path)
|
||||||
return ''
|
return ''
|
||||||
else
|
|
||||||
let path = fnamemodify(path, ':p:h')
|
|
||||||
endif
|
endif
|
||||||
let pre = substitute(matchstr(path, '^\a\a\+\ze:'), '^.', '\u&', '')
|
let pre = substitute(matchstr(path, '^\a\a\+\ze:'), '^.', '\u&', '')
|
||||||
if len(pre) && exists('*' . pre . 'Real')
|
if len(pre) && exists('*' . pre . 'Real')
|
||||||
let path = {pre}Real(path)
|
let path = {pre}Real(path)
|
||||||
endif
|
endif
|
||||||
let path = s:Slash(path)
|
let root = s:Slash(fnamemodify(path, ':p:h'))
|
||||||
let root = resolve(path)
|
|
||||||
if root !=# path
|
|
||||||
silent! exe (haslocaldir() ? 'lcd' : exists(':tcd') && haslocaldir(-1) ? 'tcd' : 'cd') '.'
|
|
||||||
endif
|
|
||||||
let previous = ""
|
let previous = ""
|
||||||
let env_git_dir = len($GIT_DIR) ? s:Slash(simplify(fnamemodify(FugitiveVimPath($GIT_DIR), ':p:s?[\/]$??'))) : ''
|
let env_git_dir = len($GIT_DIR) ? s:Slash(simplify(fnamemodify(FugitiveVimPath($GIT_DIR), ':p:s?[\/]$??'))) : ''
|
||||||
call s:Tree(env_git_dir)
|
call s:Tree(env_git_dir)
|
||||||
|
|||||||
Reference in New Issue
Block a user