From f2133ca50b036c4d1e24b616fdec63cd1fb1d33e Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 17 Sep 2023 19:03:44 -0400 Subject: [PATCH] Expire cached blank Git dir on active Fugitive invocation Resolves: https://github.com/tpope/vim-fugitive/issues/2213 --- autoload/fugitive.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index ff5663a..2efeccb 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -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