From 7d9d9bfee34ea428a127da0df900d3a26de37c38 Mon Sep 17 00:00:00 2001 From: "Santiago M. Mola" Date: Thu, 8 Dec 2016 14:24:25 +0100 Subject: plumbing/transport: allow AdvertisedReferences being called multiple times. (#165) * AdvertisedReferences is now part of transport.Session. * It is allowed to be called more than once. * It is allowed to be called before and after FetchPack/SendPack. * Implementations cache its result. --- plumbing/transport/http/common.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plumbing/transport/http/common.go') diff --git a/plumbing/transport/http/common.go b/plumbing/transport/http/common.go index a1b085b..aa3425e 100644 --- a/plumbing/transport/http/common.go +++ b/plumbing/transport/http/common.go @@ -6,6 +6,7 @@ import ( "net/http" "gopkg.in/src-d/go-git.v4/plumbing" + "gopkg.in/src-d/go-git.v4/plumbing/protocol/packp" "gopkg.in/src-d/go-git.v4/plumbing/transport" ) @@ -50,6 +51,7 @@ type session struct { auth AuthMethod client *http.Client endpoint transport.Endpoint + advRefs *packp.AdvRefs } func (s *session) SetAuth(auth transport.AuthMethod) error { -- cgit