fix(git): optimize the git cloning process in terms of space BE-11286 (#20)
This commit is contained in:
@@ -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 != "" {
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user