Add: get git submodules in one step

--recursive
--recurse-submodules
After the clone is created, initialize all submodules within, using their default settings. This is equivalent to running git submodule update --init --recursive immediately after the clone is finished. This option is ignored if the cloned repository does not have a worktree/checkout (i.e. if any of --no-checkout/-n, --bare, or --mirror is given)

from http://git-scm.com/docs/git-clone
This commit is contained in:
Janez Troha 2014-02-11 10:52:39 +01:00
parent 8102265475
commit f90c099e68

View file

@ -94,10 +94,10 @@ func (r *Repo) Commands() []string {
branch := r.Branch
if len(branch) == 0 {
branch = "master"
}
}r
cmds := []string{}
cmds = append(cmds, fmt.Sprintf("git clone --branch=%s %s %s", branch, r.Path, r.Dir))
cmds = append(cmds, fmt.Sprintf("git clone --recursive --branch=%s %s %s", branch, r.Path, r.Dir))
switch {
// if a specific commit is provided then we'll