diff options
author | Sanskar Jaiswal <jaiswalsanskar078@gmail.com> | 2023-04-18 16:31:58 +0530 |
---|---|---|
committer | Sanskar Jaiswal <jaiswalsanskar078@gmail.com> | 2023-05-04 11:53:09 +0530 |
commit | 399b1ec2d598b7950816727b8d92e8580553372c (patch) | |
tree | cdeb8c7a77d2ccd39df9f3a04e8a79546276c993 /plumbing/transport/http/upload_pack.go | |
parent | 223727feb195642234a600040b12a2d3597d0989 (diff) | |
download | go-git-399b1ec2d598b7950816727b8d92e8580553372c.tar.gz |
plumbing: transport/http, refactor transport to cache underlying transport objects
Refactor the in-built http transport to cache the underlying http
transport objects mapped to its specific options for each Git transport
object. This lets us reuse the transport for a specific set of configurations
as recommended. (ref: https://pkg.go.dev/net/http#Transport)
If there are no transport specific options provided, the default
transport is used.
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Diffstat (limited to 'plumbing/transport/http/upload_pack.go')
-rw-r--r-- | plumbing/transport/http/upload_pack.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plumbing/transport/http/upload_pack.go b/plumbing/transport/http/upload_pack.go index e735b3d..4f85145 100644 --- a/plumbing/transport/http/upload_pack.go +++ b/plumbing/transport/http/upload_pack.go @@ -19,7 +19,7 @@ type upSession struct { *session } -func newUploadPackSession(c *http.Client, ep *transport.Endpoint, auth transport.AuthMethod) (transport.UploadPackSession, error) { +func newUploadPackSession(c *client, ep *transport.Endpoint, auth transport.AuthMethod) (transport.UploadPackSession, error) { s, err := newSession(c, ep, auth) return &upSession{s}, err } |