diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 17d52fc..b3cd92d 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -128,7 +128,7 @@ function! s:ExtractGitDir(path) abort endfunction function! s:Detect(path) - if exists('b:git_dir') && b:git_dir ==# '' + if exists('b:git_dir') && (b:git_dir ==# '' || b:git_dir =~# '/$') unlet b:git_dir endif if !exists('b:git_dir')