From 7a6e282d942aec5f2553368afc40004a1995b4ed Mon Sep 17 00:00:00 2001 From: Marwan Al Jubeh Date: Thu, 7 Mar 2013 11:41:48 +0300 Subject: [PATCH] Completely remove the submodule when cleaning. This fixes a bug that used to break installing a previously removed plugin (for git 1.7.8 and above). --- autoload/vundle/installer.vim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 958b83d..eed454e 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -174,9 +174,12 @@ func! vundle#installer#delete(bang, dir_name) abort let relative_path = prefix.substitute(bundle.path(), g:bundle_dir.'/', '', '') let cmd = 'cd '.shellescape(top_level) - let cmd .= '; git config -f .git/config --remove-section submodule.'.shellescape(relative_path) let cmd .= '; git config -f .gitmodules --remove-section submodule.'.shellescape(relative_path) - let cmd .= '; git rm --cached '.shellescape(relative_path).'; ' + let cmd .= '; git config -f .git/config --remove-section submodule.'.shellescape(relative_path) + let cmd .= '; git rm --cached '.shellescape(relative_path) + let cmd .= '; rm -rf '.shellescape(relative_path) + let cmd .= '; rm -rf '.shellescape('.git/modules/'.relative_path) + let cmd .= ';' endif let cmd .= (has('win32') || has('win64')) ?