Commit Graph

66 Commits

Author SHA1 Message Date
Máximo Cuadros
2637279338 *: migration from go-git-fixtures/v4 and go-git/gcfg 2020-03-10 01:41:19 +01:00
Máximo Cuadros
2bdfd91f04 *: migration from gopkg to go modules 2020-03-10 00:40:56 +01:00
kuba--
8f6b3127c1 Expose Storage cache.
Signed-off-by: kuba-- <kuba@sourced.tech>
2018-09-07 13:48:18 +02:00
Miguel Molina
6a24b4c1f0 *: use parser to populate non writable storages and bug fixes
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
2018-08-07 18:41:19 +02:00
ferhat elmas
18e6f9daa3 all: simplification
- no length for map initialization
 - don't check for boolean/error return
 - don't format string
 - use string method of bytes buffer instead of converting bytes to
string
 - use `strings.Contains` instead of `strings.Index`
 - use `bytes.Equal` instead of `bytes.Compare`
2017-11-29 13:01:32 +01:00
Máximo Cuadros
caa4dc4729 update to go-billy.v4 and go-git-fixtures.v3
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
2017-11-23 07:19:39 +01:00
Máximo Cuadros
39ecae56e6 remote: push, update remote refs on push 2017-07-22 17:55:49 +02:00
Máximo Cuadros
1354c5f243 worktree: test improvemnts on empty worktree 2017-07-13 11:34:00 +02:00
Máximo Cuadros
abb9ec0f3e *: upgrade to go-billy.v3, merge 2017-06-18 12:15:40 +02:00
Santiago M. Mola
4a670e1308 do not convert local paths to URL
* Do not convert local paths to URLs, just keep them as they
  are.
* This way we add support for Windows without taking care of
  Windows path-to-URL conversion.
2017-04-28 16:33:31 +02:00
Antonio Jesus Navarro Perez
8df64141e3 use go-billy.v2 version 2017-03-10 12:23:51 +01:00
Antonio Jesus Navarro Perez
33e7c165c9 project: move imports from srcd.works to gopkg.in
To be able to fix #261 we will move again to gopkg.in before v4 stable release.
2017-03-07 12:58:18 +01:00
Máximo Cuadros
4e4a85703c *: update tests to meet new submodule fixture 2017-02-21 18:55:19 +01:00
Santiago M. Mola
726204ed80 git: make Storer public in Repository. 2017-02-09 15:28:48 +01:00
Máximo Cuadros
85a4efcc45 new srcd.works/go-git.v4 path 2017-01-30 23:52:39 +01:00
Máximo Cuadros
30ebf1bd9b new git fixture path 2017-01-30 23:42:11 +01:00
Máximo Cuadros
80179adaab rename billy imports 2017-01-30 22:03:19 +01:00
Máximo Cuadros
45669655f0 test and comments improvements 2017-01-30 11:40:51 +01:00
Máximo Cuadros
352170d1bf worktree, status implementation 2017-01-29 02:17:01 +01:00
Máximo Cuadros
24c1878260 new repository constructors and worktree 2017-01-28 00:42:22 +01:00
Santiago M. Mola
3b35cf557f test: restore default protocol. (#215)
BaseSuite sets the https protocol to nil. This can
affect other unrelated suites. This commit changes
BaseSuite to restore the https protocol during the
tear down phase.
2017-01-18 16:43:10 +01:00
Santiago M. Mola
0af572dd21 move plumbing from top level package to plumbing (#183)
* 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.
2016-12-14 23:12:44 +01:00
Máximo Cuadros
6996381ae4 BaseSuite improvements, usage of file:// proto 2016-12-02 00:44:06 +01:00
Máximo Cuadros
c15bf1dff3 capabilities: full integration (#151)
* 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
2016-12-01 09:59:19 +01:00
Máximo Cuadros
ef1a0579fb protocol/packp: capabilities new Capability entity and List struct, test improvements (#144)
* protocol/pakp: capabilities new Capability entity and List struct, test improvements

* etc: example cloud-config file

* removing sorting from List.String
2016-11-29 15:11:00 +01:00
Santiago M. Mola
68893edf9d remove old types from transport and use packp (#142)
* 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.
2016-11-28 09:57:38 +01:00
Santiago M. Mola
f9adb3565b move: format/packp -> protocol/packp (#141)
* 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.
2016-11-25 15:48:20 +01:00
Santiago M. Mola
08e08d771e transport: create Client interface (#132)
* 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
2016-11-23 15:38:12 +01:00
Máximo Cuadros
ac095bb12c new plumbing package (#118)
* plumbing: now core was renamed to core, and formats and clients moved inside
2016-11-08 23:46:38 +01:00
Máximo Cuadros
0ff9ef2b44 global storage interface refactor (#112)
* core: ObjectStorage, ReferenceStorage renamed to ObjectStorer and
ReferenceStorer

* rebase

* general, changes request by @alcortes

* general, changes request by @alcortes
2016-11-07 20:29:58 +01:00
Máximo Cuadros
0c6c404715 remote, fix fetch tags 2016-10-27 02:42:36 +02:00
Máximo Cuadros
194da90f88 fix fixtures usage 2016-10-26 18:22:33 +02:00
Alberto Cortés
73fa9ef25a Use advrefs in gituploadpackinfo (#92)
* 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
2016-10-26 15:56:26 +00:00
Máximo Cuadros
5913aee500 test coverage improved, Remote.Refs and Repository.Refs returns error, TreeWalker -> TreeIter 2016-09-22 23:41:48 +02:00
Máximo Cuadros
001bb130fe cleanup old fixtures 2016-09-22 18:51:21 +02:00
Máximo Cuadros
7e8d712544 dotgit: synced write packfile and index generation 2016-09-15 21:20:58 +02:00
Máximo Cuadros
d57f90b78e fixtures: new fixture package being use in all packages 2016-09-12 02:22:08 +02:00
Máximo Cuadros
3b1baea2dd format: packfile based on ObjectStorage and CRC32 calculation 2016-09-08 23:58:41 +02:00
Máximo Cuadros
56adb5be3a format: packfile new interface 2016-09-07 02:04:43 +02:00
Máximo Cuadros
65427f6459 core: ObjectStorage.Begin and TxObjectStorage 2016-09-05 07:59:20 +02:00
Máximo Cuadros
5bed3e8fab clients: default Auth methods 2016-08-31 23:42:36 +02:00
Máximo Cuadros
a3418c5e0a Repository: Clone protection if non empty object storage, Remote: NoErrAlreadyUpToDate 2016-08-25 17:25:31 +02:00
Máximo Cuadros
2ed3474ab8 ForEach review and Commit.Tree err return 2016-08-22 03:29:05 +02:00
Máximo Cuadros
5b13c1a2e5 options renamed and some text fixes 2016-08-22 00:30:50 +02:00
Máximo Cuadros
1d56b98d9b Remote.Fetch base on RefSpec, improvement of the responsabilities separation 2016-08-19 17:42:13 +02:00
Máximo Cuadros
bcb49927a3 Repository.Clone and Remote.Fetch remote, local branches and client: correct header read 2016-08-15 03:51:04 +02:00
Máximo Cuadros
f6fe29c80d core: Storage, removing err returning *Storages 2016-08-14 18:21:10 +02:00
Máximo Cuadros
79087748f6 Repository.Clone and Remote.Fetch tests and improvements 2016-08-13 22:32:34 +02:00
Máximo Cuadros
a6ea9e8dd2 Repository and Remote API changes 2016-08-13 01:51:00 +02:00
Máximo Cuadros
805cc777b0 general: usage of the new Reference objects 2016-08-12 01:59:53 +02:00