From f1bfa5f6cfdfadb1ded0d2a7a79cef98fa24b37d Mon Sep 17 00:00:00 2001 From: Jacobo de Vera Date: Thu, 4 Aug 2011 01:59:20 +0200 Subject: [PATCH] Append '.git' to uris for short form repos Uris for repos specified as user/repo end up being https://github.com/user/repo. For some reason, github allows cloning from such uris, however, it is better to rely on the addresses that github provide for cloning, and those include the trailing .git This change appends .git to github repo uris when needed. --- autoload/vundle/config.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index 2f28648..e8443c1 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -44,6 +44,9 @@ func! s:parse_name(arg) if arg =~? '^\s*\(gh\|github\):\S\+' \ || arg =~? '^[a-z0-9][a-z0-9-]*/[^/]\+$' let uri = 'https://github.com/'.split(arg, ':')[-1] + if uri !~? '\.git$' + let uri .= '.git' + endif let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i') elseif arg =~? '^\s*\(git@\|git://\)\S\+' \ || arg =~? '\(file\|https\?\)://'