main.go: Fixes git error: did you mean `--depth` (with two dashes ?)

This commit is contained in:
TerraTech 2016-11-13 03:47:02 -05:00
parent 6ed689440f
commit cf180e765b
1 changed files with 1 additions and 1 deletions

View File

@ -314,7 +314,7 @@ func addWorktreeAndSwap(gitRoot, dest, branch, rev, hash string) error {
func cloneRepo(repo, branch, rev string, depth int, gitRoot string) error { func cloneRepo(repo, branch, rev string, depth int, gitRoot string) error {
args := []string{"clone", "--no-checkout", "-b", branch} args := []string{"clone", "--no-checkout", "-b", branch}
if depth != 0 { if depth != 0 {
args = append(args, "-depth", strconv.Itoa(depth)) args = append(args, "--depth", strconv.Itoa(depth))
} }
args = append(args, repo, gitRoot) args = append(args, repo, gitRoot)
_, err := runCommand("", "git", args...) _, err := runCommand("", "git", args...)