diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-07-25 14:26:17 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2017-07-25 14:26:17 +0200 |
commit | af3f5e2b9139674b49c5caf0bc06e93cbc426727 (patch) | |
tree | 06dbaadba6bbee95afd3212438e2434846312dcc /plumbing/transport/internal/common/server.go | |
parent | 8e83055176bbbbbde206884f10dc238fd378b9b4 (diff) | |
download | go-git-af3f5e2b9139674b49c5caf0bc06e93cbc426727.tar.gz |
transport: context package support
Diffstat (limited to 'plumbing/transport/internal/common/server.go')
-rw-r--r-- | plumbing/transport/internal/common/server.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plumbing/transport/internal/common/server.go b/plumbing/transport/internal/common/server.go index dd6cfbe..f4ca692 100644 --- a/plumbing/transport/internal/common/server.go +++ b/plumbing/transport/internal/common/server.go @@ -1,6 +1,7 @@ package common import ( + "context" "fmt" "io" @@ -34,7 +35,7 @@ func ServeUploadPack(cmd ServerCommand, s transport.UploadPackSession) (err erro } var resp *packp.UploadPackResponse - resp, err = s.UploadPack(req) + resp, err = s.UploadPack(context.TODO(), req) if err != nil { return err } @@ -57,7 +58,7 @@ func ServeReceivePack(cmd ServerCommand, s transport.ReceivePackSession) error { return fmt.Errorf("error decoding: %s", err) } - rs, err := s.ReceivePack(req) + rs, err := s.ReceivePack(context.TODO(), req) if rs != nil { if err := rs.Encode(cmd.Stdout); err != nil { return fmt.Errorf("error in encoding report status %s", err) |