From 68f326d9e1be90b664b7a733a2702c25fcf104f1 Mon Sep 17 00:00:00 2001 From: Nao YONASHIRO Date: Wed, 22 May 2019 10:07:42 +0900 Subject: [PATCH] feat: add --depth option to git clone (#46) --- pkg/git/git.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/git/git.go b/pkg/git/git.go index aedb7c311a..7fede49537 100644 --- a/pkg/git/git.go +++ b/pkg/git/git.go @@ -92,7 +92,7 @@ func clone(url, repoPath string) error { } func cloneByOSCommand(url, repoPath string) error { - commandAndArgs := []string{"clone", url, repoPath} + commandAndArgs := []string{"clone", "--depth=1", url, repoPath} _, err := utils.Exec("git", commandAndArgs) if err != nil { return xerrors.Errorf("error in git clone: %w", err)