mirror of
https://github.com/tpope/vim-rhubarb.git
synced 2025-12-06 20:24:29 +08:00
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:
@@ -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', '')
|
||||
|
||||
Reference in New Issue
Block a user