aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/http/receive_pack.go
diff options
context:
space:
mode:
authorAndrew Suffield <asuffield@gmail.com>2021-03-26 16:03:49 +0000
committerGitHub <noreply@github.com>2021-03-26 17:03:49 +0100
commite5bbc4d10904554dbc8fd5afd06f66814f7b173e (patch)
tree6a1508b51ede537c75896ba6650a8f5fb0ad09f8 /plumbing/transport/http/receive_pack.go
parent1f328388192915476c68e5e0c8c1c818fd50fc6b (diff)
downloadgo-git-e5bbc4d10904554dbc8fd5afd06f66814f7b173e.tar.gz
plumbing: wire up contexts for Transport.AdvertisedReferences (#246)
* plumbing: wire up contexts for Transport.AdvertisedReferences * add more tests for context wiring
Diffstat (limited to 'plumbing/transport/http/receive_pack.go')
-rw-r--r--plumbing/transport/http/receive_pack.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/plumbing/transport/http/receive_pack.go b/plumbing/transport/http/receive_pack.go
index 433dfcf..4d14ff2 100644
--- a/plumbing/transport/http/receive_pack.go
+++ b/plumbing/transport/http/receive_pack.go
@@ -25,7 +25,11 @@ func newReceivePackSession(c *http.Client, ep *transport.Endpoint, auth transpor
}
func (s *rpSession) AdvertisedReferences() (*packp.AdvRefs, error) {
- return advertisedReferences(s.session, transport.ReceivePackServiceName)
+ return advertisedReferences(context.TODO(), s.session, transport.ReceivePackServiceName)
+}
+
+func (s *rpSession) AdvertisedReferencesContext(ctx context.Context) (*packp.AdvRefs, error) {
+ return advertisedReferences(ctx, s.session, transport.ReceivePackServiceName)
}
func (s *rpSession) ReceivePack(ctx context.Context, req *packp.ReferenceUpdateRequest) (