Module: BasicSubmodulePrimitives
- Included in:
- Git::Lib
- Defined in:
- lib/git/basic_submodules.rb
Instance Method Summary collapse
-
#update_submodules(**options) ⇒ Object
Extend Git::Lib to support shotgunning submodules.
Instance Method Details
#update_submodules(**options) ⇒ Object
Extend Git::Lib to support shotgunning submodules. This command is not smart, and it has very poor support for submodule options. For example, you can’t pass any arguments to the handful of submodule options that accept them (like –depth). We may extend it later, but for rev. 0001, simply initializing them will suffice
9 10 11 12 13 14 15 16 17 |
# File 'lib/git/basic_submodules.rb', line 9 def update_submodules(**) arr_opts = ['update'] .each_pair do |k, v| arr_opts << "--#{k}" if v end Dir.chdir(@git_work_dir) do command('submodule', arr_opts) end end |