diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index dbbc754..8ddb28d 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -136,6 +136,9 @@ function! fugitive#extract_git_dir(path) abort " checking for them since such checks are extremely slow. break endif + if index(split($GIT_CEILING_DIRECTORIES, ':'), root) >= 0 + break + endif let dir = s:sub(root, '[\/]$', '') . '/.git' let type = getftype(dir) if type ==# 'dir' && fugitive#is_git_dir(dir)