Skip to content

Commit

Permalink
Clone submodules after the checkout of the branch, as branch can have…
Browse files Browse the repository at this point in the history
… it's own commit versions
  • Loading branch information
vishalya committed Jan 21, 2016
1 parent dc6849a commit 9c22402
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/omnibus/fetchers/git_fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ def fetch
else
force_recreate_project_dir! unless dir_empty?(project_dir)
git_clone
git_checkout
git_clone_submodules if clone_submodules?
end
end

Expand Down Expand Up @@ -141,7 +143,16 @@ def cloned?
# @return [void]
#
def git_clone
git("clone#{" --recursive" if clone_submodules?} #{source_url} .")
git("clone #{source_url} .")
end

#
# Clone the +source_url+ into the +project_dir+.
#
# @return [void]
#
def git_clone_submodules
git("submodule update --init --recursive")
end

#
Expand Down

0 comments on commit 9c22402

Please sign in to comment.