aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/internal/common/common.go
Commit message (Collapse)AuthorAgeFilesLines
* plumbing/transport/internal: common, add support of Gogs for ↵Jerome Doucet2018-07-141-0/+5
| | | | | | ErrRepositoryNotFound, avoiding to get an 'unknown error: '. Add some tests for existing supported services (github, gitlab, etc...) too. Signed-off-by: Jerome Doucet <jerdct@gmail.com>
* *: add pointer to the new transport.Endpoint structMáximo Cuadros2017-11-211-4/+4
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* Add sideband support for pushOri Rawlings2017-09-011-2/+16
|
* transport: context package supportMáximo Cuadros2017-07-251-9/+45
|
* transport/internal: read only first error lineSantiago M. Mola2017-07-071-17/+17
| | | | | | | We only use the first line of error output. So we use a channel with a single byte buffer and read the first line from stderr. Further output is discarded, as well as any further I/O error, which might be expected when closing the pipe (command finished).
* transport/internal: remove Wait function, use Close directlySantiago M. Mola2017-06-131-21/+5
|
* plumbing/transport: detect "access denied error"Santiago M. Mola2017-06-131-5/+10
| | | | | | | "ERR access denied or repository not exported:" is now detected as transport.ErrRepositoryNotFound, since that's what git-daemon returns when --informative-errors is not used.
* plumbing/transport: detect git protocol "no such repository" errorSantiago M. Mola2017-06-131-0/+5
|
* ensure receive-pack session is closed on push.Santiago M. Mola2017-06-131-1/+5
| | | | | | * at low level, ReceivePack must close its stream to the server to signal it has finished. * remote.go: Close() must be called on session.
* project: move imports from srcd.works to gopkg.inAntonio Jesus Navarro Perez2017-03-071-5/+5
| | | | To be able to fix #261 we will move again to gopkg.in before v4 stable release.
* Remove TODOs from documentationAntonio Jesus Navarro Perez2017-02-281-5/+5
|
* new srcd.works/go-git.v4 pathMáximo Cuadros2017-01-301-5/+5
|
* transport/http: fix partial request with haves. Fix #216. (#221)Antonio Navarro Perez2017-01-251-1/+1
|
* transport: remove SetAuth, fixes #206 (#210)Anthony Weems2017-01-171-14/+7
| | | | | * remove SetAuth functions, implement at NewUploadPackSession/NewReceivePackSession level. * propagate transport.Auth from Fetch/Pull/Clone options to the transport API.
* server: add git server implementation (#190)Santiago M. Mola2017-01-041-14/+14
| | | | | | | | | | | | | | | * server: add generic server implementation (transport-independent), both for git-upload-pack and git-receive-pack. * server: move internal functions to internal/common. * cli: add git-receive-pack and git-upload-pack implementations. * format/packfile: add UpdateObjectStorage function, extracted from Remote. * transport: implement tranport RPC-like, only with git-upload-pack and git-receive-pack methods. Client renamed to Transport. * storer: add storer.Storer interface. * protocol/packp: add UploadPackResponse constructor with packfile. * protocol/packp: fix UploadPackResponse encoding, add tests. * protocol/packp/capability: implement All.
* remote: add Push (#178)Santiago M. Mola2016-12-191-2/+2
| | | | | | | | | | | | * remote: add Push. * add Push method to Remote. * add method Push to Repository. * examples: add push example. * requested changes * add tests, fixes
* transport: new git protocol (#175)Máximo Cuadros2016-12-121-32/+59
|
* transport: add git-send-pack support to local/ssh. (#163)Santiago M. Mola2016-12-091-9/+46
| | | | | | | | | * 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.
* plumbing/transport: allow AdvertisedReferences being called multiple times. ↵Santiago M. Mola2016-12-081-12/+9
| | | | | | | | (#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.
* revision based on goreportcard.comMáximo Cuadros2016-12-061-1/+0
|
* protocol/packp: UploadPackResponse implementation (#161)Máximo Cuadros2016-12-061-21/+11
| | | | | | | | | | | | | | | | * plumbing/protocol: paktp avoid duplication of haves, wants and shallow * protocol/pakp: UploadPackResponse implementation * changes * changes * changes * debug * changes
* transport/internal: error handling fixes and clean up (#160)Santiago M. Mola2016-12-061-21/+92
| | | | | | | | | | | | | | | | | | | | * protocol/packp: remove redundant isFlush check on AdvRefs. * protocol/packp: improve AdvRefs documentation. * transport: improve error handling for non-existing repos. * protocol/packp: AdvRefs Decode now returns different errors for empty, but syntactically correct, AdvRefs message (ErrEmptyAdvRefs) and empty input (ErrEmptyInput). * transport/internal/common: read stderr only when needed (ErrEmptyInput). Close the client gracefully. * transport/internal/common: missing stderr on non existing repository does not block. * transport/internal/common: buffer error messages. * transport/file: fix changing binary name, add tests. * transport/file: support changing git-upload-pack and git-receive-pack binary names. * transport/file: add tests for misbehaving servers. * transport/internal/common: remove Stderr field. * transport/internal/common: do not close twice.
* capabilities: full integration (#151)Máximo Cuadros2016-12-011-0/+5
| | | | | | | | | | | | | | | | | | * format/pktline: fix readPayloadLen err handling * protocol/pakp: UploadReq validation and creation of capabilities * protocol/pakp: AdvRef tests * protocol/pakp: capability.List.Delete * protocol: filter unsupported capabilities * remote capability negociation * transport: UploadRequest validation * requested changes
* transport: add local transport (#145)Santiago M. Mola2016-11-291-0/+295
* transport: move common packp protocol out of ssh transport. * fixtures: add fixture for empty repository. * transport: add file:// transport