in cmd/git_clone.go [43:64]
func cloneAndCheckout(cmd *cobra.Command, args []string) error {
repoUrl := args[0]
var ecmd *exec.Cmd
var path string
if len(Dir) > 0 {
path = Dir
} else {
path = getRepoName(repoUrl)
}
ecmd = exec.Command("git", "clone", repoUrl, path)
if err := ecmd.Run(); err != nil {
return err
}
err := checkout(cmd, path)
if err != nil {
return err
}
return nil
}