views:

569

answers:

4

(Why there is no|Is there a) way to run

./script/plugin install -SOME_HIDDEN_OPTION git://github.com...

So that the plugin is installed as git submodule. The reason for submodules is to keep unrelated code off project's repository.

Perhaps there is a reason not keep plugins as submodules?

+1  A: 
./script/plugin install git://github.com/something/something...

Should work without a submodule...

If you want to update the plugin, just navigate into that plugin's folder and do a git pull.

The only advantage of the submodule is that you can see all your submodules from anywhere in the git repository. Otherwise, git just find the nearest git repository and works on that... in te above case, navigating to the plugin's directory will make it the repository you are working on.

phillc
I edited my question so it is more obvious that the sole reason for submodules is not to keep tons of vendor/plugin/* in my repository
artemave
A: 

Submodules are a bit warty. Also if you clone your repo and one of your submodule remotes is down you're stuck.

I end up tweaking the local code on occasion as well, which necessitates it being in my repo.

Braid makes managing this situation simple.

Jason Watkins
+2  A: 

Give this a shot:

http://doblock.com/articles/using-git-submodules-to-manage-plugins-in-rails

Mike
Capistrano bit is helpful, thanks. I tried to use plain 'git submodule update --init' after deploy but that didn't seem to work.
artemave