mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-15 14:53:51 -05:00
Don't assume FugitiveGitDir() is actual directory
This is currently a valid assumption, but it boxes us in. Instead use
fugitive#Find('.git/'), which is guaranteed to return a path to an
actual directory.
Also use fugitive#Find('.git/refs/..') to determine the common
directory.
This commit is contained in:
@@ -176,7 +176,7 @@ function! FugitiveCommonDir(...) abort
|
||||
if empty(dir)
|
||||
return ''
|
||||
endif
|
||||
return fugitive#CommonDir(dir)
|
||||
return fugitive#Find('.git/refs/..', dir)
|
||||
endfunction
|
||||
|
||||
function! FugitiveWorkTree(...) abort
|
||||
|
||||
Reference in New Issue
Block a user