From 7fec10e088dc25b6eb6604393c25eb3f32c1ac0c Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 15 Feb 2015 18:39:34 +0900 Subject: [PATCH] Remove `git::@` from URI if git 2.3.0 or above is found Related: #161, #133, #109 --- plug.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plug.vim b/plug.vim index f8cba38..422dc45 100644 --- a/plug.vim +++ b/plug.vim @@ -718,6 +718,15 @@ function! s:update_impl(pull, force, args) abort return endif + if !s:is_win && s:git_version_requirement(2, 3) + let git_terminal_prompt = exists('$GIT_TERMINAL_PROMPT') ? $GIT_TERMINAL_PROMPT : '' + let $GIT_TERMINAL_PROMPT = 0 + for plug in values(todo) + let plug.uri = substitute(plug.uri, + \ '^https://git::@github\.com', 'https://github.com', '') + endfor + endif + if !isdirectory(g:plug_home) try call mkdir(g:plug_home, 'p') @@ -774,6 +783,10 @@ function! s:update_impl(pull, force, args) abort else call s:update_vim() endif + + if exists('git_terminal_prompt') + let $GIT_TERMINAL_PROMPT = git_terminal_prompt + endif endfunction function! s:update_finish()