diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 4ea35bd..f5cffac 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -2090,7 +2090,10 @@ endfunction augroup fugitive_files autocmd! - autocmd BufReadCmd *.git/{,**/}index{,.lock} exe s:BufReadIndex() + autocmd BufReadCmd index{,.lock} + \ if s:is_git_dir(expand(':p:h')) | + \ exe s:BufReadIndex() | + \ endif autocmd FileReadCmd fugitive://**//[0-3]/** exe s:FileRead() autocmd BufReadCmd fugitive://**//[0-3]/** exe s:BufReadIndexFile() autocmd BufWriteCmd fugitive://**//[0-3]/** exe s:BufWriteIndexFile()