mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-17 15:53:43 -05:00
Partially support ".git" files and symlinks without core.worktree
This is not and can never be 100% perfect. There's no way to work back from a file like info/exclude COMMIT_EDITMSG to the work tree. So core.worktree continues to be recommended. References: https://github.com/tpope/vim-fugitive/issues/1920
This commit is contained in:
@@ -1796,7 +1796,9 @@ function! fugitive#Find(object, ...) abort
|
||||
elseif rev ==# ':'
|
||||
let fdir = simplify(FugitiveActualDir(dir) . '/')
|
||||
let f = fdir . 'index'
|
||||
if len($GIT_INDEX_FILE)
|
||||
if !s:cpath(dir . '/', fdir)
|
||||
let f = urlprefix
|
||||
elseif len($GIT_INDEX_FILE)
|
||||
let index_dir = substitute(s:GitIndexFileEnv(), '[^/]\+$', '', '')
|
||||
if s:cpath(index_dir, fdir)
|
||||
let f = s:GitIndexFileEnv()
|
||||
|
||||
Reference in New Issue
Block a user