diff --git a/api/git/git.go b/api/git/git.go index 63161f7fa..6c2835815 100644 --- a/api/git/git.go +++ b/api/git/git.go @@ -34,6 +34,7 @@ func (c *gitClient) download(ctx context.Context, dst string, opt cloneOption) e Depth: opt.depth, InsecureSkipTLS: opt.tlsSkipVerify, Auth: getAuth(opt.username, opt.password), + Tags: git.NoTags, } if opt.referenceName != "" { diff --git a/api/git/git_test.go b/api/git/git_test.go index 0bce90d56..81efa2688 100644 --- a/api/git/git_test.go +++ b/api/git/git_test.go @@ -24,8 +24,7 @@ func setup(t *testing.T) string { t.Fatal(errors.Wrap(err, "failed to open an archive")) } - err = archive.ExtractTarGz(file, dir) - if err != nil { + if err := archive.ExtractTarGz(file, dir); err != nil { t.Fatal(errors.Wrapf(err, "failed to extract file from the archive to a folder %s", dir)) }