mirror of
https://github.com/tpope/vim-rhubarb.git
synced 2025-12-07 20:54:27 +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
|
endif
|
||||||
|
|
||||||
function! s:Config() abort
|
function! s:Config() abort
|
||||||
if exists('*FugitiveCommonDir')
|
if exists('*FugitiveFind')
|
||||||
let dir = FugitiveCommonDir()
|
|
||||||
elseif exists('*FugitiveFind')
|
|
||||||
let dir = FugitiveFind('.git/config')[0:-8]
|
let dir = FugitiveFind('.git/config')[0:-8]
|
||||||
else
|
else
|
||||||
let dir = get(b:, 'git_dir', '')
|
let dir = get(b:, 'git_dir', '')
|
||||||
|
|||||||
Reference in New Issue
Block a user