Skip to content

Commit

Permalink
Do not inject git:: to url when git 2.3.0 or above found
Browse files Browse the repository at this point in the history
Related: #161
  • Loading branch information
junegunn committed Feb 15, 2015
1 parent 54fc8a4 commit 76d3e8d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plug.vim
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ endfunction

function! s:define_commands()
command! -nargs=+ -bar Plug call s:add(<args>)
let s:default_url_format =
\ !s:is_win && executable('git') && s:git_version_requirement(2, 3) ?
\ 'https://github.com/%s.git' : 'https://git::@github.com/%s.git'
if !executable('git')
return s:err('`git` executable not found. vim-plug requires git.')
endif
Expand Down Expand Up @@ -460,7 +463,7 @@ function! s:infer_properties(name, repo)
if repo !~ '/'
let repo = 'vim-scripts/'. repo
endif
let fmt = get(g:, 'plug_url_format', 'https://git::@github.com/%s.git')
let fmt = get(g:, 'plug_url_format', s:default_url_format)
let uri = printf(fmt, repo)
endif
let dir = s:dirpath( fnamemodify(join([g:plug_home, a:name], '/'), ':p') )
Expand Down Expand Up @@ -744,6 +747,10 @@ function! s:update_impl(pull, force, args) abort
call append(0, ['', ''])
normal! 2G

if !s:is_win
let $GIT_TERMINAL_PROMPT = 0
endif

if s:ruby && s:update.threads > 1
try
let imd = &imd
Expand Down

0 comments on commit 76d3e8d

Please sign in to comment.