mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-06 12:44:24 +08:00
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user