From 6593c757346f9817a770ff0ea091cce3e8243070 Mon Sep 17 00:00:00 2001 From: Anthony Weems Date: Tue, 17 Jan 2017 11:17:11 -0600 Subject: transport: remove SetAuth, fixes #206 (#210) * remove SetAuth functions, implement at NewUploadPackSession/NewReceivePackSession level. * propagate transport.Auth from Fetch/Pull/Clone options to the transport API. --- plumbing/transport/server/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plumbing/transport/server/server.go') diff --git a/plumbing/transport/server/server.go b/plumbing/transport/server/server.go index 6787e9d..542b439 100644 --- a/plumbing/transport/server/server.go +++ b/plumbing/transport/server/server.go @@ -30,7 +30,7 @@ func NewServer(loader Loader) transport.Transport { return &server{loader, &handler{}} } -func (s *server) NewUploadPackSession(ep transport.Endpoint) (transport.UploadPackSession, error) { +func (s *server) NewUploadPackSession(ep transport.Endpoint, auth transport.AuthMethod) (transport.UploadPackSession, error) { sto, err := s.loader.Load(ep) if err != nil { return nil, err @@ -39,7 +39,7 @@ func (s *server) NewUploadPackSession(ep transport.Endpoint) (transport.UploadPa return s.handler.NewUploadPackSession(sto) } -func (s *server) NewReceivePackSession(ep transport.Endpoint) (transport.ReceivePackSession, error) { +func (s *server) NewReceivePackSession(ep transport.Endpoint, auth transport.AuthMethod) (transport.ReceivePackSession, error) { sto, err := s.loader.Load(ep) if err != nil { return nil, err -- cgit