From f928ba0491396cf7a8242b7db9287610e17154e3 Mon Sep 17 00:00:00 2001 From: mduan Date: Wed, 6 Jun 2012 20:11:06 -0700 Subject: [PATCH 1/2] Make git clone also grab submodules With just `git clone`, submodules are not grabbed. This is an issue for certain plugins, such as 'kevinw/pyflakes-vim' that requires a pyflakes submodule --- autoload/vundle/installer.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 38a2436..6814f94 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -216,7 +216,7 @@ func! s:sync(bang, bundle) abort let get_current_sha = 'cd '.shellescape(a:bundle.path()).' && git rev-parse HEAD' let initial_sha = s:system(get_current_sha)[0:15] else - let cmd = 'git clone '.a:bundle.uri.' '.shellescape(a:bundle.path()) + let cmd = 'git clone --recursive '.a:bundle.uri.' '.shellescape(a:bundle.path()) let initial_sha = '' endif From c4985923e2664b3095627730533c0ff83773a7dc Mon Sep 17 00:00:00 2001 From: mduan Date: Thu, 7 Jun 2012 13:32:42 -0700 Subject: [PATCH 2/2] Also update submodules during git pull --- autoload/vundle/installer.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 6814f94..b0c9526 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -206,7 +206,7 @@ func! s:sync(bang, bundle) abort let git_dir = expand(a:bundle.path().'/.git/', 1) if isdirectory(git_dir) if !(a:bang) | return 'todate' | endif - let cmd = 'cd '.shellescape(a:bundle.path()).' && git pull' + let cmd = 'cd '.shellescape(a:bundle.path()).' && git pull && git submodule update --init --recursive' if (has('win32') || has('win64')) let cmd = substitute(cmd, '^cd ','cd /d ','') " add /d switch to change drives