mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 22:03:51 -05:00
Convert exec path to Vim path before accessing via filesystem
This commit is contained in:
@@ -2675,7 +2675,7 @@ augroup END
|
|||||||
function! s:AskPassArgs(dir) abort
|
function! s:AskPassArgs(dir) abort
|
||||||
if (len($DISPLAY) || len($TERM_PROGRAM) || has('gui_running')) &&
|
if (len($DISPLAY) || len($TERM_PROGRAM) || has('gui_running')) &&
|
||||||
\ empty($GIT_ASKPASS) && empty($SSH_ASKPASS) && empty(fugitive#ConfigGetAll('core.askpass', a:dir))
|
\ empty($GIT_ASKPASS) && empty($SSH_ASKPASS) && empty(fugitive#ConfigGetAll('core.askpass', a:dir))
|
||||||
if s:executable(s:ExecPath() . '/git-gui--askpass')
|
if s:executable(FugitiveVimPath(s:ExecPath() . '/git-gui--askpass'))
|
||||||
return ['-c', 'core.askPass=' . s:ExecPath() . '/git-gui--askpass']
|
return ['-c', 'core.askPass=' . s:ExecPath() . '/git-gui--askpass']
|
||||||
elseif s:executable('ssh-askpass')
|
elseif s:executable('ssh-askpass')
|
||||||
return ['-c', 'core.askPass=ssh-askpass']
|
return ['-c', 'core.askPass=ssh-askpass']
|
||||||
@@ -3058,8 +3058,8 @@ function! fugitive#Command(line1, line2, range, bang, mods, arg) abort
|
|||||||
return (empty(cmd) ? 'exe' : cmd) . after
|
return (empty(cmd) ? 'exe' : cmd) . after
|
||||||
endif
|
endif
|
||||||
let alias = FugitiveConfigGet('alias.' . get(args, 0, ''), config)
|
let alias = FugitiveConfigGet('alias.' . get(args, 0, ''), config)
|
||||||
if get(args, 1, '') !=# '--help' && alias !~# '^$\|^!\|[\"'']' && !filereadable(s:ExecPath() . '/git-' . args[0])
|
if get(args, 1, '') !=# '--help' && alias !~# '^$\|^!\|[\"'']' && !filereadable(FugitiveVimPath(s:ExecPath() . '/git-' . args[0]))
|
||||||
\ && !(has('win32') && filereadable(s:ExecPath() . '/git-' . args[0] . '.exe'))
|
\ && !(has('win32') && filereadable(FugitiveVimPath(s:ExecPath() . '/git-' . args[0] . '.exe')))
|
||||||
call remove(args, 0)
|
call remove(args, 0)
|
||||||
call extend(args, split(alias, '\s\+'), 'keep')
|
call extend(args, split(alias, '\s\+'), 'keep')
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user