From 2d0909b816dccd67033a97745926e5ea60f800d6 Mon Sep 17 00:00:00 2001 From: gmarik Date: Sat, 23 Jul 2011 15:42:31 -0500 Subject: [PATCH] name may have revision specified - as SHA1/symbolic-ref/tag separated by space Ie Bundle 'gmarik/vundle test' or Bundle 'gmarik/vundle 5b4e238' --- autoload/vundle/config.vim | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index a1420a6..8362209 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -37,7 +37,15 @@ func! s:parse_options(opts) endf func! s:parse_name(arg) - let arg = a:arg + let args = split(a:arg, '\s\+') + let arg = args[0] + let opts = {} + + if len(args) == 2 + let revision = args[1] + let opts = {'v': revision} + end + if arg =~? '^\s*\(gh\|github\):\S\+' \ || arg =~? '^[a-z0-9][a-z0-9-]*/[^/]\+$' let uri = 'https://github.com/'.split(arg, ':')[-1] @@ -51,7 +59,7 @@ func! s:parse_name(arg) let name = arg let uri = 'https://github.com/vim-scripts/'.name.'.git' endif - return {'name': name, 'uri': uri } + return extend(opts, {'name': name, 'uri': uri }) endf func! s:rtp_rm_a()