diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 4abb3ac..a916c9e 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -110,7 +110,7 @@ function! FugitiveExtractGitDir(path) abort endfunction function! FugitiveDetect(path) abort - if exists('b:git_dir') && (b:git_dir ==# '' || b:git_dir =~# '/$') + if exists('b:git_dir') && b:git_dir =~# '^$\|/$\|^fugitive:' unlet b:git_dir endif if !exists('b:git_dir')