aboutsummaryrefslogtreecommitdiffstats
path: root/remote.go
Commit message (Collapse)AuthorAgeFilesLines
* *: package context support in Repository, Remote and SubmoduleMáximo Cuadros2017-07-261-12/+43
|
* Merge pull request #507 from mcuadros/ctxMáximo Cuadros2017-07-251-2/+3
|\ | | | | transport: context package support allowing cancellation of any network operation
| * *: context.TODO()Máximo Cuadros2017-07-251-2/+3
| |
* | remote: push, update remote refs on pushMáximo Cuadros2017-07-221-15/+42
|/
* repository: allow push from shallow repositoriesMáximo Cuadros2017-07-191-1/+11
|
* Merge pull request #485 from mcuadros/fetch-tagsv4.0.0-rc12Máximo Cuadros2017-07-171-56/+83
|\ | | | | remote: fetch, correct behavior on tags
| * remote: fetch, correct behaviour on tagsMáximo Cuadros2017-07-171-56/+83
| |
* | remote: avoid duplicate havesMáximo Cuadros2017-07-131-3/+13
|/
* improve delete support on pushSantiago M. Mola2017-07-111-4/+18
| | | | | | | | | | | | | | | | | | | | | | | * 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.
* remote: fix push delete, closes #466Santiago M. Mola2017-07-071-12/+48
| | | | | Refspecs for deletes were not being used to produce delete commands on the update request.
* Update local remote references during fetch even if no pack needs to be receivedOri Rawlings2017-06-191-25/+45
|
* Merge pull request #421 from smola/iter-namingMáximo Cuadros2017-06-141-1/+1
|\ | | | | fix naming of NewCommit{Pre,Post}Iterator
| * fix naming of NewCommit{Pre,Post}IteratorSantiago M. Mola2017-06-131-1/+1
| | | | | | | | | | Use Iter suffix, just as all other iterators in the project. Use Preorder and Postorder to be more clear.
* | ensure receive-pack session is closed on push.Santiago M. Mola2017-06-131-0/+2
|/ | | | | | * at low level, ReceivePack must close its stream to the server to signal it has finished. * remote.go: Close() must be called on session.
* Merge pull request #367 from smola/push-tagsMáximo Cuadros2017-04-271-1/+0
|\ | | | | add test for tags push, closes #354
| * add test for tags push, closes #354Santiago M. Mola2017-04-271-1/+0
| |
* | Merge pull request #365 from smola/git-rel-pathSantiago M. Mola2017-04-271-2/+2
|\ \ | |/ |/| transport: make Endpoint an interface, fixes #362
| * transport: make Endpoint an interface, fixes #362Santiago M. Mola2017-04-271-2/+2
| | | | | | | | | | * add internal *url.URL implementation for regular URLs. * add internal implementation for SCP-like URLs.
* | support force push (refspec with +)Santiago M. Mola2017-04-271-22/+64
|/ | | | | * add support for force push * add support for push of new references
* fix format string issues as found by go vetSantiago M. Mola2017-04-261-1/+1
|
* project: move imports from srcd.works to gopkg.inAntonio Jesus Navarro Perez2017-03-071-13/+13
| | | | To be able to fix #261 we will move again to gopkg.in before v4 stable release.
* Add full stops and keep implementation details as internal comments.Antonio Jesus Navarro Perez2017-03-031-2/+2
|
* improve git package documentation (fix #231)Antonio Jesus Navarro Perez2017-03-031-1/+1
|
* plumbing/revlist: input as a slice of hashes instead of commitsAntonio Jesus Navarro Perez2017-02-271-12/+6
| | | | | | | - Now the input of the method Objects inside revlist package is a slice of hashes instead of commits. Hashes can be from Blobs, Trees and Commits objects. - ObjectStorer now is used to obtain the object content using hashes slice. - This PR fix #222. Now a test into upload_pack_test.go file is not skipped anymore. - Remove code from remote.go and server.go that is not necessary.
* submodule init implementationMáximo Cuadros2017-02-121-3/+6
|
* documentation changesMáximo Cuadros2017-01-311-5/+5
|
* new srcd.works/go-git.v4 pathMáximo Cuadros2017-01-301-13/+13
|
* Repository.Progress moved as a field in *Options (#237)Máximo Cuadros2017-01-301-5/+5
|
* transport: remove SetAuth, fixes #206 (#210)Anthony Weems2017-01-171-6/+6
| | | | | * remove SetAuth functions, implement at NewUploadPackSession/NewReceivePackSession level. * propagate transport.Auth from Fetch/Pull/Clone options to the transport API.
* remote: fix empty-git-upload-pack error in fetch, when the reference points ↵Máximo Cuadros2017-01-121-3/+4
| | | | to a non-commit object (#209)
* doc: clarify return values of Pull/Fetch. (#205)Santiago M. Mola2017-01-121-0/+2
|
* server: add git server implementation (#190)Santiago M. Mola2017-01-041-33/+11
| | | | | | | | | | | | | | | * 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-5/+228
| | | | | | | | | | | | * remote: add Push. * add Push method to Remote. * add method Push to Repository. * examples: add push example. * requested changes * add tests, fixes
* remote: make Fetch atomic. (#185)Santiago M. Mola2016-12-161-139/+140
| | | | | | | * Remote now exposes only Fetch. No Connect, Disconnect, etc. * Repository uses a private fetch method in Remote for Clone/Pull. * getting capabilities, HEAD or other information from remote requires using the lower level client. * add Fetch method to Repository.
* storage: shallow storage (#180)Máximo Cuadros2016-12-151-0/+12
| | | | | | | | * storage: shallow storage * changes * changes
* move plumbing from top level package to plumbing (#183)Santiago M. Mola2016-12-141-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * plumbing: rename Object -> EncodedObject. * plumbing/storer: rename ObjectStorer -> EncodedObjectStorer. * move difftree to plumbing/difftree. * move diff -> utils/diff * make Object/Tag/Blob/Tree/Commit/File depend on storer. * Object and its implementations now depend only on storer.EncodedObjectStorer, not git.Repository. * Tests are decoupled accordingly. * move Object/Commit/File/Tag/Tree to plumbing/object. * move Object/Commit/File/Tag/Tree to plumbing/object. * move checkClose to utils/ioutil. * move RevListObjects to plumbing/revlist.Objects. * move DiffTree to plumbing/difftree package. * rename files with plural nouns to singular * plumbing/object: add GetBlob/GetCommit/GetTag/GetTree.
* remote: fix Connect, returned nil error on failure. (#167)Santiago M. Mola2016-12-081-1/+1
|
* remote: sideband support (#164)Máximo Cuadros2016-12-071-3/+30
| | | | | | * remote: sideband support * changes
* BaseSuite improvements, usage of file:// protoMáximo Cuadros2016-12-021-1/+5
|
* capabilities: full integration (#151)Máximo Cuadros2016-12-011-3/+3
| | | | | | | | | | | | | | | | | | * 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-1/+2
| | | | | | | | | | 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-22/+34
| | | | | | | | | | * 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.
* move: format/packp -> protocol/packp (#141)Santiago M. Mola2016-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | * move: format/packp -> protocol/packp * format/packp -> protocol/packp * format/packp/pktline -> format/pktline. * move: protocol/packp/ulreq/* -> protocol/packp/* * protocol/packp: rename UlReq types to make them unique. * * protocol/packp: namespace UlReq encoder. * protocol/packp: namespace UlReq decoder. * protocol/packp: fix example names * move: protocol/packp/advrefs/* -> protocol/packp/* * further ulreq namespacing * protocol/packp: namespace AdvRefs types.
* transport: create Client interface (#132)Santiago M. Mola2016-11-231-15/+28
| | | | | | | | | | | | | | | * plumbing: move plumbing/client package to plumbing/transport. * transport: create Client interface. * A Client can instantiate any client transport service. * InstallProtocol installs a Client for a given protocol, instead of just a UploadPackService. * A Client can open a session for fetch-pack or send-pack for a specific Endpoint. * Adapt ssh and http clients to the new client interface. * updated doc
* Add configurable http client factory (fixes #120) (#121)ferhat elmas2016-11-151-5/+2
| | | | | | | | | | | | | | | | * new http client factory ready to install/override default http(s) * mv GitUploadPackServiceFactory to clients.common pkg * rename http.HTTPError to http.Err * rename http.HTTPAuthMethod to http.AuthMethod * add doc and examples/ usage * general improvements: - update install link in readme to v4 (example are already pointing v4) - fix indentation in package doc (styling for godoc.org) - use http.Status constants instead of integers - close leaked response body - rm named returns which stutter in doc - fix one format string - rm unnecessary if checks - documentation fixes
* new plumbing package (#118)Máximo Cuadros2016-11-081-25/+26
| | | * plumbing: now core was renamed to core, and formats and clients moved inside
* global storage interface refactor (#112)Máximo Cuadros2016-11-071-16/+14
| | | | | | | | | | | * core: ObjectStorage, ReferenceStorage renamed to ObjectStorer and ReferenceStorer * rebase * general, changes request by @alcortes * general, changes request by @alcortes
* remote, fix fetch tagsMáximo Cuadros2016-10-271-2/+12
|
* remote, fix copy tag reference on fetchMáximo Cuadros2016-10-261-3/+28
|
* Use advrefs in gituploadpackinfo (#92)Alberto Cortés2016-10-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add advrefs encoder and parser * modify advrefs encoder to resemble json encoder * turn advrefs parser into a decoder * clean code * improve documentation * improve documentation * clean code * upgrade to new pktline.Add and add Flush const to easy integration * gometalinter * Use packp/advrefs for GitUploadPackInfo parsing - GitUploadPackInfo now uses packp/advrefs instead of parsing the message by itself. - Capabilities has been moved from clients/common to packp to avoid a circular import. - Cleaning of advrefs_test code. - Add support for prefix encoding and decoding in advrefs. * clean advrefs test code * clean advrefs test code * clean advrefs test code * gometalinter * add pktline encoder * change pktline.EncodeFlush to pktline.Flush * make scanner tests use the encoder instead of Pktlines * check errors on flush and clean constants * ubstitute the PktLines type with a pktline.Encoder * use pktline.Encoder in all go-git * add example of pktline.Encodef() * add package overview * documentation * support symbolic links other than HEAD * simplify decoding of shallows * packp: fix mcuadros comments - all abbreviates removed (by visual inspection, some may remain) - all empty maps are initialized using make - simplify readRef with a switch - make decodeShallow malformed error more verbose - add pktline.Encoder.encodeLine - remove infamous panic in checkPayloadLength by refactoring out the whole function