Support all git index locations

This commit is contained in:
Tim Pope
2012-03-16 22:27:45 -04:00
parent a6982fe7f5
commit 0b1625a798

View File

@@ -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('<amatch>: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()