Do not depend on fugitive for finding git root

Revert #239
Close #387
This commit is contained in:
Junegunn Choi 2017-06-16 10:39:50 +09:00
parent cf60e54647
commit ccc32c3164
No known key found for this signature in database
GPG key ID: 254BC280FEF9C627

View file

@ -447,14 +447,7 @@ endfunction
" GFiles[?]
" ------------------------------------------------------------------
" helper function to get the git root. Uses vim-fugitive if available for EXTRA SPEED!
function! s:get_git_root()
if exists('*fugitive#repo')
try
return fugitive#repo().tree()
catch
endtry
endif
let root = split(system('git rev-parse --show-toplevel'), '\n')[0]
return v:shell_error ? '' : root
endfunction