From 9e34f68d980de57631c588aaa910c9ea95ed7c2e Mon Sep 17 00:00:00 2001 From: "Santiago M. Mola" Date: Fri, 25 Nov 2016 09:25:49 +0100 Subject: plumbing/transport: add common tests and fixes. (#136) * plumbing/transport: add common tests and fixes. * add common test suite for different transport implementations. * fix different behaviour on error handling for ssh and http. fixes issue #123. * support detecting unexisting repositories with SSH + GitHub/Bitbucket (apparently, there is no standard for all SSH servers). * remove ssh.NewClient (only DefaultClient makes sense at the moment). * make ssh.Client and http.Client private. * utils/ioutil: utilities to work with io interfaces. * * transport: test actual objects fetched, not just packfile size. * * fix doc typo. * * improve UploadPackRequest.IsEmpty --- plumbing/transport/common.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plumbing/transport/common.go') diff --git a/plumbing/transport/common.go b/plumbing/transport/common.go index cc30564..8329069 100644 --- a/plumbing/transport/common.go +++ b/plumbing/transport/common.go @@ -24,9 +24,12 @@ import ( var ( ErrRepositoryNotFound = errors.New("repository not found") + ErrEmptyRemoteRepository = errors.New("remote repository is empty") ErrAuthorizationRequired = errors.New("authorization required") ErrEmptyUploadPackRequest = errors.New("empty git-upload-pack given") ErrInvalidAuthMethod = errors.New("invalid auth method") + + ErrAdvertistedReferencesAlreadyCalled = errors.New("cannot call AdvertisedReference twice") ) const ( -- cgit