diff options
author | Santiago M. Mola <santi@mola.io> | 2016-12-09 14:44:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-09 14:44:03 +0100 |
commit | 0e1a52757a3938e97cf7d31e0dff3c9949001763 (patch) | |
tree | 8b998fdc3eaaf6b2d6c69a125759a778664207a5 /plumbing/transport/common.go | |
parent | 4f16cc925238aae81586e917d26b8ff6b6a340bd (diff) | |
download | go-git-0e1a52757a3938e97cf7d31e0dff3c9949001763.tar.gz |
transport: add git-send-pack support to local/ssh. (#163)
* protocol/packp: add Packfile field to ReferenceUpdateRequest.
* protocol/packp: add NewReferenceUpdateRequestFromCapabilities.
* NewReferenceUpdateRequestFromCapabilities can be used to create
a ReferenceUpdateRequest with initial capabilities compatible with
the server.
* protocol/packp: fix new line handling on report status.
* transport/file: test error on unexisting command.
Diffstat (limited to 'plumbing/transport/common.go')
-rw-r--r-- | plumbing/transport/common.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plumbing/transport/common.go b/plumbing/transport/common.go index 41813bf..83fd5a3 100644 --- a/plumbing/transport/common.go +++ b/plumbing/transport/common.go @@ -49,6 +49,8 @@ type Session interface { SetAuth(auth AuthMethod) error // AdvertisedReferences retrieves the advertised references for a // repository. + // If the repository does not exist, returns ErrRepositoryNotFound. + // If the repository exists, but is empty, returns ErrEmptyRemoteRepository. AdvertisedReferences() (*packp.AdvRefs, error) io.Closer } @@ -75,10 +77,9 @@ type FetchPackSession interface { // In that order. type SendPackSession interface { Session - // UpdateReferences sends an update references request and returns a - // writer to be used for packfile writing. - //TODO: Complete signature. - SendPack() (io.WriteCloser, error) + // UpdateReferences sends an update references request and a packfile + // reader and returns a ReportStatus and error. + SendPack(*packp.ReferenceUpdateRequest) (*packp.ReportStatus, error) } type Endpoint url.URL |