aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing
diff options
context:
space:
mode:
authorPaulo Gomes <pjbgf@linux.com>2023-11-14 09:36:44 +0000
committerGitHub <noreply@github.com>2023-11-14 09:36:44 +0000
commiteb1b04dbe45f7c9e866eb52e8ccccf3885a06217 (patch)
tree079a0e7944ec8280aa2d157b9fd6996d9ef941b9 /plumbing
parenta9509b0a52f116ea2969d51890a4265d98d50dcb (diff)
parenta28a4ac965f714e7506ba26212556fd3d9817712 (diff)
downloadgo-git-eb1b04dbe45f7c9e866eb52e8ccccf3885a06217.tar.gz
Merge pull request #922 from aymanbagabas/cleanup-ioutil
utils: remove ioutil.Pipe and use std library io.Pipe
Diffstat (limited to 'plumbing')
-rw-r--r--plumbing/transport/file/client.go3
-rw-r--r--plumbing/transport/server/server.go2
2 files changed, 2 insertions, 3 deletions
diff --git a/plumbing/transport/file/client.go b/plumbing/transport/file/client.go
index 6f0a380..38714e2 100644
--- a/plumbing/transport/file/client.go
+++ b/plumbing/transport/file/client.go
@@ -11,7 +11,6 @@ import (
"github.com/go-git/go-git/v5/plumbing/transport"
"github.com/go-git/go-git/v5/plumbing/transport/internal/common"
- "github.com/go-git/go-git/v5/utils/ioutil"
"golang.org/x/sys/execabs"
)
@@ -112,7 +111,7 @@ func (c *command) Start() error {
func (c *command) StderrPipe() (io.Reader, error) {
// Pipe returned by Command.StderrPipe has a race with Read + Command.Wait.
// We use an io.Pipe and close it after the command finishes.
- r, w := ioutil.Pipe()
+ r, w := io.Pipe()
c.cmd.Stderr = w
c.stderrCloser = r
return r, nil
diff --git a/plumbing/transport/server/server.go b/plumbing/transport/server/server.go
index 11fa0c8..cf5d6f4 100644
--- a/plumbing/transport/server/server.go
+++ b/plumbing/transport/server/server.go
@@ -166,7 +166,7 @@ func (s *upSession) UploadPack(ctx context.Context, req *packp.UploadPackRequest
return nil, err
}
- pr, pw := ioutil.Pipe()
+ pr, pw := io.Pipe()
e := packfile.NewEncoder(pw, s.storer, false)
go func() {
// TODO: plumb through a pack window.