diff options
author | Santiago M. Mola <santi@mola.io> | 2016-12-08 14:24:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-08 14:24:25 +0100 |
commit | 7d9d9bfee34ea428a127da0df900d3a26de37c38 (patch) | |
tree | 225c5661c6be1a000c2e5cc15961c214040c7cff /plumbing/transport/http/common.go | |
parent | 3962b8d4dbb2d2d61e9282d73f8d3d0f2a222461 (diff) | |
download | go-git-7d9d9bfee34ea428a127da0df900d3a26de37c38.tar.gz |
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.
Diffstat (limited to 'plumbing/transport/http/common.go')
-rw-r--r-- | plumbing/transport/http/common.go | 2 |
1 files changed, 2 insertions, 0 deletions
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 { |