From 5d5a2eb88a39f60b719be128043a45683ca75615 Mon Sep 17 00:00:00 2001 From: gmarik Date: Mon, 18 Oct 2010 21:37:10 -0500 Subject: [PATCH] Improved Git uperations --- plugin/vundle.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugin/vundle.vim b/plugin/vundle.vim index 26291db..d3b8f0d 100644 --- a/plugin/vundle.vim +++ b/plugin/vundle.vim @@ -41,7 +41,12 @@ function! vundle#sync_bundles() for bundle in g:bundles let bundle_path = s:BundlePath(bundle) let bundle_uri = g:bundle_uris[bundle] - execute '!echo "* '.bundle.'";cd '.bundle_path.' 2>/dev/null && git pull || git clone '.bundle_uri.' '.bundle_path + let git_dir = bundle_path.'/.git' + let cmd = isdirectory(git_dir) ? + \ '--git-dir='.git_dir.' pull' : + \ 'clone '.bundle_uri.' '.bundle_path + exec '!echo -ne "* '.bundle.'"' + exec '!git '.cmd endfor endfunction