Prefer FugitiveFind() over FugitiveCommonDir()

FugitiveFind() is guaranteed to include a Vim friendly path, while
FugitiveCommonDir() currently returns a Git friendly path.  That is, the
latter uses forwards slashes even on win32, and might do something to
accommodate Cygwin.
This commit is contained in:
Tim Pope
2019-08-19 06:24:46 -04:00
parent c509c7eede
commit 9edacf9d5b

View File

@@ -16,9 +16,7 @@ if get(g:, 'fugitive_git_command', 'git') ==# 'git' && executable('hub')
endif
function! s:Config() abort
if exists('*FugitiveCommonDir')
let dir = FugitiveCommonDir()
elseif exists('*FugitiveFind')
if exists('*FugitiveFind')
let dir = FugitiveFind('.git/config')[0:-8]
else
let dir = get(b:, 'git_dir', '')