Skip to content

Commit 5b24e17

Browse files
authored
Merge pull request #24 from TerraTech/fix_git_depth
main.go: Fixes git error: did you mean `--depth` (with two dashes ?)
2 parents 6ed6894 + cf180e7 commit 5b24e17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/git-sync/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ func addWorktreeAndSwap(gitRoot, dest, branch, rev, hash string) error {
314314
func cloneRepo(repo, branch, rev string, depth int, gitRoot string) error {
315315
args := []string{"clone", "--no-checkout", "-b", branch}
316316
if depth != 0 {
317-
args = append(args, "-depth", strconv.Itoa(depth))
317+
args = append(args, "--depth", strconv.Itoa(depth))
318318
}
319319
args = append(args, repo, gitRoot)
320320
_, err := runCommand("", "git", args...)

0 commit comments

Comments
 (0)