Working on a ruby/git project using Grit, but I'm unable to update my submodules programmatically. I figured out how the missing_method function maps to git and how to use it to perform tasks not written in to grit, however the submodule update function doesnt seem to work.
Here is an example of my code:
git = Grit::Git.new(@repository)
git.pull
pp git.submodule({:quiet => false, :verbose => true, :p开发者_Go百科rogress => true}, "update")
Returns:
""
Thanks in advance!
not familiar with grit, but in plain git you would
git submodule update --init --recursive
The init part sets the remote url in the submodule. Hopefully you have :init => true
and :recursive => true
parameters available. Recursive is optional for you. Use it if your submodule repo has submodules itself.
Hope this helps.
精彩评论