From b37021d925722d22e0fd2ff4866c58df12d85f6f Mon Sep 17 00:00:00 2001 From: Colin Wood Date: Mon, 25 Aug 2014 09:41:19 -0400 Subject: [PATCH 1/2] Use ssh over using https for github uris. It is a little nicer to use ssh over https for getting repos. --- plug.vim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plug.vim b/plug.vim index 63de48a..f8cf0a9 100644 --- a/plug.vim +++ b/plug.vim @@ -379,7 +379,11 @@ function! s:infer_properties(name, repo) if repo !~ '/' let repo = 'vim-scripts/'. repo endif - let uri = 'https://git::@github.com/' . repo . '.git' + if g:plug_use_ssh == 1 + let uri = 'git@github.com:' . repo . '.git' + else + let uri = 'https://git::@github.com/' . repo . '.git' + endif endif let dir = s:dirpath( fnamemodify(join([g:plug_home, a:name], '/'), ':p') ) return { 'dir': dir, 'uri': uri } @@ -1251,4 +1255,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - From aff77f648f46cc46c8ad2f83b9b3d631cc546214 Mon Sep 17 00:00:00 2001 From: Colin Wood Date: Mon, 25 Aug 2014 09:46:35 -0400 Subject: [PATCH 2/2] Check for existing variable --- plug.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plug.vim b/plug.vim index f8cf0a9..b27cf02 100644 --- a/plug.vim +++ b/plug.vim @@ -379,7 +379,7 @@ function! s:infer_properties(name, repo) if repo !~ '/' let repo = 'vim-scripts/'. repo endif - if g:plug_use_ssh == 1 + if exists('g:plug_use_ssh') && g:plug_use_ssh == 1 let uri = 'git@github.com:' . repo . '.git' else let uri = 'https://git::@github.com/' . repo . '.git'