Don't override explicit empty string for core.askPass

References https://github.com/tpope/vim-fugitive/issues/1410
This commit is contained in:
Tim Pope
2019-12-06 12:56:59 -05:00
parent 671a85daba
commit 42c6fd1440

View File

@@ -4393,7 +4393,7 @@ endfunction
function! s:AskPassArgs(dir) abort
if (len($DISPLAY) || len($TERM_PROGRAM) || has('gui_running')) && fugitive#GitVersion(1, 8) &&
\ empty($GIT_ASKPASS) && empty($SSH_ASKPASS) && empty(fugitive#Config('core.askPass', a:dir))
\ empty($GIT_ASKPASS) && empty($SSH_ASKPASS) && empty(get(fugitive#Config(a:dir), 'core.askpass', []))
if s:executable(s:ExecPath() . '/git-gui--askpass')
return ['-c', 'core.askPass=' . s:ExecPath() . '/git-gui--askpass']
elseif s:executable('ssh-askpass')