Expire cached blank Git dir on active Fugitive invocation

Resolves: https://github.com/tpope/vim-fugitive/issues/2213
This commit is contained in:
Tim Pope
2023-09-17 19:03:44 -04:00
parent 7e72fb9cde
commit f2133ca50b

View File

@@ -116,6 +116,9 @@ function! s:VersionCheck() abort
elseif !fugitive#GitVersion(1, 8, 5)
return 'return ' . string('echoerr "fugitive: Git 1.8.5 or newer required"')
else
if exists('b:git_dir') && empty(b:git_dir)
unlet! b:git_dir
endif
return ''
endif
endfunction