Skip to content

Commit 925ec7b

Browse files
committed
Merge pull request #168 from junegunn/git-no-prompt
Do not inject `git::` to url when git 2.3.0 or above found
2 parents 54fc8a4 + 7fec10e commit 925ec7b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

plug.vim

+13
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,15 @@ function! s:update_impl(pull, force, args) abort
718718
return
719719
endif
720720

721+
if !s:is_win && s:git_version_requirement(2, 3)
722+
let git_terminal_prompt = exists('$GIT_TERMINAL_PROMPT') ? $GIT_TERMINAL_PROMPT : ''
723+
let $GIT_TERMINAL_PROMPT = 0
724+
for plug in values(todo)
725+
let plug.uri = substitute(plug.uri,
726+
\ '^https://git::@github\.com', 'https://github.com', '')
727+
endfor
728+
endif
729+
721730
if !isdirectory(g:plug_home)
722731
try
723732
call mkdir(g:plug_home, 'p')
@@ -774,6 +783,10 @@ function! s:update_impl(pull, force, args) abort
774783
else
775784
call s:update_vim()
776785
endif
786+
787+
if exists('git_terminal_prompt')
788+
let $GIT_TERMINAL_PROMPT = git_terminal_prompt
789+
endif
777790
endfunction
778791

779792
function! s:update_finish()

0 commit comments

Comments
 (0)