Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git clone fails for vundle if it already exists #108

Closed
javier-lopez opened this issue Nov 6, 2011 · 4 comments
Closed

Git clone fails for vundle if it already exists #108

javier-lopez opened this issue Nov 6, 2011 · 4 comments
Labels

Comments

@javier-lopez
Copy link

I've followed the https://github.com/gmarik/vundle quick start guide and letting vundle to manage vundle, I maintain my dotfiles under git, so in order to verify if it will work in others computers I've deleted .vimrc and .vim to reproduce my setup.

I've added .vimrc and .vim/bundle/vundle/autoload to my git repository, and I've cloned it, however when I enter to vim and run :BundleInstall it fails only for vundle, the log print the following:

"fatal: destination path vundle already exists and is not an empty directory."

My settings are these:

set runtimepath+=~/.vim/bundle/vundle/
call vundle#rc()

I've had to delete it and clone it manually to get it working

I think it would be really cool if vundle could manage in a better way the chicken or egg problem, maybe by forcing to clone the vundle repo if its manage for itself.

Thanks and sry for the complaints, it's as it's an awesome script

@randymorris
Copy link
Contributor

Rather than adding vundle to your own git repo, I suggest adding something like this to your vimrc and keep vundle completely unmanaged by your git repo.

if !isdirectory(expand("~/.vim/bundle/vundle/.git"))
    !git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle
endif

@javier-lopez
Copy link
Author

Well, I think than it'll also work that way, I'll manage it like that

It seems like when expanding dirs it needs to be nested, the following worked in my system:

if !isdirectory(expand(expand("~/.vim/bundle/vundle/.git/")))

1 hour after...

Actually, what I'll be using will be:

if !isdirectory(expand(expand("~/.vim/bundle/vundle/.git/")))
"call inputsave()
echon "Setting up vundle, this may take a while, wanna continue? (y/n): "
if nr2char(getchar()) ==? 'y'
!git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle
endif
"call inputrestore()
endif

@gmarik
Copy link
Contributor

gmarik commented Dec 20, 2011

@chilicuil, why did you add .vim/bundle/vundle/autoload dir to you git repo instead bundle/vundle dir?

Vundle checks for .git to be present in a bundle/some_bundle/.
Since your setup doesn't follow this pattern it makes Vundle fail.
Add bundle/vundle to your repo(making sure bundle/vundle/.git is present) and it will work as expected.

@gmarik gmarik closed this as completed Dec 20, 2011
@gmarik
Copy link
Contributor

gmarik commented Dec 20, 2011

Closing.
Feel free to reopen if you still having issues!
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants