From 3e7b39fe52a63665c0d5da68331d75afb0088ed1 Mon Sep 17 00:00:00 2001 From: gmarik Date: Mon, 24 Oct 2011 20:49:44 -0500 Subject: [PATCH] introduce g:vundle_default_git_proto option - use `let g:vundle_default_git_proto = 'git'` to set default protocol to build URIs to clone from --- autoload/vundle/config.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index b4578e4..6ee86a6 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -41,10 +41,11 @@ endf func! s:parse_name(arg) let arg = a:arg + let git_proto = exists('g:vundle_default_git_proto') ? g:vundle_default_git_proto : 'http' if arg =~? '^\s*\(gh\|github\):\S\+' \ || arg =~? '^[a-z0-9][a-z0-9-]*/[^/]\+$' - let uri = 'https://github.com/'.split(arg, ':')[-1] + let uri = git_proto.'://github.com/'.split(arg, ':')[-1] if uri !~? '\.git$' let uri .= '.git' endif @@ -56,7 +57,7 @@ func! s:parse_name(arg) let name = split( substitute(uri,'/\?\.git\s*$','','i') ,'\/')[-1] else let name = arg - let uri = 'https://github.com/vim-scripts/'.name.'.git' + let uri = git_proto.'://github.com/vim-scripts/'.name.'.git' endif return {'name': name, 'uri': uri, 'name_spec': arg } endf