开发者

Grit submodule update returns nil

开发者 https://www.devze.com 2023-03-08 03:44 出处:网络
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 wri

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消