diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-07-25 16:14:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-25 16:14:32 +0200 |
commit | fbf2a4ab4588c78e3d9d0265dba774ae6b388b5f (patch) | |
tree | 883e9172499234f9f258fb41190fcd0f9134c0a4 /remote.go | |
parent | 25a0420bc0544f826e5517365e986d83bbb926c8 (diff) | |
parent | db5fa522f36207684ec0d67b98cac6313f0259b6 (diff) | |
download | go-git-fbf2a4ab4588c78e3d9d0265dba774ae6b388b5f.tar.gz |
Merge pull request #507 from mcuadros/ctx
transport: context package support allowing cancellation of any network operation
Diffstat (limited to 'remote.go')
-rw-r--r-- | remote.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,6 +1,7 @@ package git import ( + "context" "errors" "fmt" "io" @@ -270,7 +271,7 @@ func newClient(url string) (transport.Transport, transport.Endpoint, error) { func (r *Remote) fetchPack(o *FetchOptions, s transport.UploadPackSession, req *packp.UploadPackRequest) (err error) { - reader, err := s.UploadPack(req) + reader, err := s.UploadPack(context.TODO(), req) if err != nil { return err } @@ -713,7 +714,7 @@ func pushHashes(sess transport.ReceivePackSession, sto storer.EncodedObjectStore done <- wr.Close() }() - rs, err := sess.ReceivePack(req) + rs, err := sess.ReceivePack(context.TODO(), req) if err != nil { return nil, err } |