aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/test
Commit message (Collapse)AuthorAgeFilesLines
* *: Remove use of deprecated io/utilPaulo Gomes2023-05-112-8/+4
| | | | Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* fix goreportcard warningsOleg Kovalov2020-07-011-1/+1
|
* *: migration from go-git-fixtures/v4 and go-git/gcfgMáximo Cuadros2020-03-101-20/+20
|
* *: migration from gopkg to go modulesMáximo Cuadros2020-03-102-12/+12
|
* Simplify return statement in receivePackNoCheckIskander (Alex) Sharipov2018-12-121-5/+1
| | | | | | Fixes #1035 Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
* *: use parser to populate non writable storages and bug fixesMiguel Molina2018-08-072-7/+6
| | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
* Remove printlnAntonio Jesus Navarro Perez2018-06-051-1/+0
| | | | Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
* plumbing: transport, make target repo writeable in testsJavi Fontan2018-03-271-0/+21
| | | | | | | | | Some tests write to an already existent repository retrieved from fixtures. The permissions of these files are read only and make receive pack fail. This was shadowed before as close errors were lost. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* all: make the upcoming Go 1.11's vet happyDaniel Martí2018-03-011-11/+11
| | | | | | | | | | vet in 1.10 and earlier was buggy in how its "composite literal uses unkeyed fields" check had false negatives when it encountered a slice of pointer types that omitted each element's type. This has been fixed in tip, so adapt to that fix. Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
* update to go-billy.v4 and go-git-fixtures.v3Máximo Cuadros2017-11-231-1/+1
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* *: add pointer to the new transport.Endpoint structMáximo Cuadros2017-11-212-10/+10
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* config: support a configurable, and turn-off-able, pack.windowJeremy Stribling2017-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | One use of go-git is to transfer git data from a non-standard git repo (not stored in a file system, for example) to a "remote" backed by a standard, local .git repo. In this scenario, delta compression is not needed to reduce transfer time over the "network", because there is no network. The underlying storage layer has already taken care of the data tranfer, and sending the objects to local .git storage doesn't require compression. So this PR gives the user the option to turn off compression when it isn't needed. Of course, this results in a larger, uncompressed local .git repo, but the user can then run git gc or git repack on that repo if they care about the storage costs. Turning the pack window to 0 on reduces total push time of a 36K repo by 50 seconds (out of a pre-PR total of 3m26s).
* *: windows support, some more fixes (2) (#536)Manuel Carmona2017-08-071-0/+6
| | | | | | | | | | | | | | * fixed windows failed test: "143 FAIL: worktree_test.go:314: WorktreeSuite.TestFilenameNormalization" * fixed windows failed test: "489: FAIL: auth_method_test.go:106: SuiteCommon.TestNewSSHAgentAuthNoAgent" * fixed windows failed test: "279 FAIL: server_test.go:50: ServerSuite.TestClone" fixed windows failed test: "298 FAIL: server_test.go:37: ServerSuite.TestPush" * fixed windows failed test: "316 FAIL: <autogenerated>:26: UploadPackSuite.TearDownSuite" * fixed windows failed test: "FAIL: <autogenerated>:6: IndexSuite.TearDownSuite"
* *: windows support, some more fixes (#533)Manuel Carmona2017-08-031-0/+1
| | | | | | | | | | * fixed windows failed test: "134 FAIL: repository_test.go:340: RepositorySuite.TestPlainOpenBareRelativeGitDirFileTrailingGarbage" * fixed windows failed test: "143 FAIL: worktree_test.go:367: WorktreeSuite.TestCheckoutIndexOS" * fixed windows failed test: "296 FAIL: receive_pack_test.go:36: ReceivePackSuite.TearDownTest" * fixed windows failed test: "152 FAIL: worktree_test.go:278: WorktreeSuite.TestCheckoutSymlink"
* transport: context package supportMáximo Cuadros2017-07-252-13/+89
|
* improve delete support on pushSantiago M. Mola2017-07-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | * server: implement delete-refs and announce it. * remote: check if server announced delete-refs before trying to delete and fail fast if it does not. Note that the client does not need no send 'delete-refs' back to the server to be able to delete references: ``` delete-refs ----------- If the server sends back the 'delete-refs' capability, it means that it is capable of accepting a zero-id value as the target value of a reference update. It is not sent back by the client, it simply informs the client that it can be sent zero-id values to delete references. ``` So our server implementation does not check if the client sent delete-refs back, it just accepts deletes if it receives them.
* transport/internal: remove Wait function, use Close directlySantiago M. Mola2017-06-131-1/+2
|
* fix ReceivePackSuite.TestSendPackAddDeleteReferenceSantiago M. Mola2017-06-131-2/+4
|
* project: move imports from srcd.works to gopkg.inAntonio Jesus Navarro Perez2017-03-072-12/+12
| | | | To be able to fix #261 we will move again to gopkg.in before v4 stable release.
* new srcd.works/go-git.v4 pathMáximo Cuadros2017-01-302-12/+12
|
* new git fixture pathMáximo Cuadros2017-01-301-1/+1
|
* transport/http: fix partial request with haves. Fix #216. (#221)Antonio Navarro Perez2017-01-251-0/+15
|
* transport: remove SetAuth, fixes #206 (#210)Anthony Weems2017-01-172-23/+25
| | | | | * 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-042-88/+88
| | | | | | | | | | | | | | | * 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-8/+45
| | | | | | | | | | | | * remote: add Push. * add Push method to Remote. * add method Push to Repository. * examples: add push example. * requested changes * add tests, fixes
* packfile: delta selection logic (#182)Antonio Navarro Perez2016-12-161-1/+1
| | | | | | | | | | * packfile: delta selection logic - Implemented logic to assign deltas to objects * Requested changes * Improved tests and fix errors
* transport: add git-send-pack support to local/ssh. (#163)Santiago M. Mola2016-12-092-0/+285
| | | | | | | | | * 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-4/+6
| | | | | | | | (#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.
* capabilities: full integration (#151)Máximo Cuadros2016-12-011-8/+32
| | | | | | | | | | | | | | | | | | * 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
* protocol/packp: capabilities new Capability entity and List struct, test ↵Máximo Cuadros2016-11-291-2/+5
| | | | | | | | | | improvements (#144) * protocol/pakp: capabilities new Capability entity and List struct, test improvements * etc: example cloud-config file * removing sorting from List.String
* remove old types from transport and use packp (#142)Santiago M. Mola2016-11-281-6/+7
| | | | | | | | | | * protocol: move UploadPackRequest to protocol. * UploadPackRequest is now defined as an embedding of UploadRequest and UploadHaves. * Move http encoding specific code from UploadPackRequest to transport/http. * rename UlReq to UploadRequest * packp: move AdvRefs Encoder/Decoder to Encode/Decode methods. * packp: move UploadRequest Encoder/Decoder to Encode/Decode methods. * packp: Remove transport.UploadPackInfo in favor of packp. AdvRefs.
* plumbing/transport: add common tests and fixes. (#136)Santiago M. Mola2016-11-251-0/+166
* 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