diff --git a/pkg/git.go b/pkg/git.go index e08bb85..375a5b8 100644 --- a/pkg/git.go +++ b/pkg/git.go @@ -144,7 +144,7 @@ func gzipUntar(dst string, r io.Reader, subDir string) error { } func remoteResolveRef(ctx context.Context, remote string, ref string) (string, error) { - b := bytes.NewBuffer(nil) + b := &bytes.Buffer{} cmd := exec.CommandContext(ctx, "git", "ls-remote", "--heads", "--tags", "--refs", "--quiet", remote, ref) cmd.Stdin = os.Stdin cmd.Stdout = b