main.go: Fixes git error: did you mean `--depth` (with two dashes ?)
This commit is contained in:
parent
6ed689440f
commit
cf180e765b
|
|
@ -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...)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue