aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--go.mod1
-rw-r--r--go.sum4
-rw-r--r--plumbing/transport/file/client.go3
-rw-r--r--plumbing/transport/server/server.go2
-rw-r--r--remote.go2
-rw-r--r--utils/ioutil/common.go12
-rw-r--r--utils/ioutil/pipe.go9
-rw-r--r--utils/ioutil/pipe_js.go9
8 files changed, 4 insertions, 38 deletions
diff --git a/go.mod b/go.mod
index c7bfb14..18b60da 100644
--- a/go.mod
+++ b/go.mod
@@ -6,7 +6,6 @@ go 1.19
require (
dario.cat/mergo v1.0.0
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371
- github.com/acomagu/bufpipe v1.0.4
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5
github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a
github.com/emirpasic/gods v1.18.1
diff --git a/go.sum b/go.sum
index 4b75ae7..f5af023 100644
--- a/go.sum
+++ b/go.sum
@@ -5,8 +5,6 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg=
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=
-github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ=
-github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
@@ -50,8 +48,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
-github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A=
-github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA=
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=
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.
diff --git a/remote.go b/remote.go
index bbe275d..2b4122e 100644
--- a/remote.go
+++ b/remote.go
@@ -1387,7 +1387,7 @@ func pushHashes(
allDelete bool,
) (*packp.ReportStatus, error) {
- rd, wr := ioutil.Pipe()
+ rd, wr := io.Pipe()
config, err := s.Config()
if err != nil {
diff --git a/utils/ioutil/common.go b/utils/ioutil/common.go
index b0ace4e..235af71 100644
--- a/utils/ioutil/common.go
+++ b/utils/ioutil/common.go
@@ -195,7 +195,7 @@ func NewWriterOnError(w io.Writer, notify func(error)) io.Writer {
}
// NewWriteCloserOnError returns a io.WriteCloser that call the notify function
-//when an unexpected (!io.EOF) error happens, after call Write function.
+// when an unexpected (!io.EOF) error happens, after call Write function.
func NewWriteCloserOnError(w io.WriteCloser, notify func(error)) io.WriteCloser {
return NewWriteCloser(NewWriterOnError(w, notify), w)
}
@@ -208,13 +208,3 @@ func (r *writerOnError) Write(p []byte) (n int, err error) {
return
}
-
-type PipeReader interface {
- io.ReadCloser
- CloseWithError(err error) error
-}
-
-type PipeWriter interface {
- io.WriteCloser
- CloseWithError(err error) error
-}
diff --git a/utils/ioutil/pipe.go b/utils/ioutil/pipe.go
deleted file mode 100644
index f30c452..0000000
--- a/utils/ioutil/pipe.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// +build !js
-
-package ioutil
-
-import "io"
-
-func Pipe() (PipeReader, PipeWriter) {
- return io.Pipe()
-}
diff --git a/utils/ioutil/pipe_js.go b/utils/ioutil/pipe_js.go
deleted file mode 100644
index cf102e6..0000000
--- a/utils/ioutil/pipe_js.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// +build js
-
-package ioutil
-
-import "github.com/acomagu/bufpipe"
-
-func Pipe() (PipeReader, PipeWriter) {
- return bufpipe.New(nil)
-}