aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* transport: create Client interface (#132)Santiago M. Mola2016-11-2336-1402/+1523
| | | | | | | | | | | | | | | * 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
* difftree: merkletrie internal package with iterator (#133)Alberto Cortés2016-11-239-0/+1004
|
* plumbing: format, packfile fix issue #129, related #124, and documentation ↵Máximo Cuadros2016-11-232-51/+154
| | | | | | | | improvements (#130) * plumbing: format, packfile fix issue #129, related #124 * plumbing: format, packfile documentation improvements
* utils: fs, memory fix read offsetMáximo Cuadros2016-11-202-1/+23
|
* utils: fs, memory fix ReadDir, error getting filenameMáximo Cuadros2016-11-202-1/+43
|
* Add configurable http client factory (fixes #120) (#121)ferhat elmas2016-11-1512-77/+205
| | | | | | | | | | | | | | | | * 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
* Fix nil tx bug (#124)v4.0.0-rc4Alberto Cortés2016-11-142-3/+31
| | | | | | * add test for non-seekable packfiles * packfile: do not throw away the newly created transactioner
* utils/fs: add ReadAt to memory file and tests. (#122)Santiago M. Mola2016-11-113-2/+46
| | | | * memory files now implement io.ReaderAt. * tests now check ReadAt behaviour.
* new plumbing package (#118)Máximo Cuadros2016-11-08133-1933/+2000
| | | * plumbing: now core was renamed to core, and formats and clients moved inside
* config: storer commentMáximo Cuadros2016-11-071-1/+1
|
* gofmt simplify (#111)ferhat elmas2016-11-0713-189/+188
|
* global storage interface refactor (#112)Máximo Cuadros2016-11-0737-730/+548
| | | | | | | | | | | * core: ObjectStorage, ReferenceStorage renamed to ObjectStorer and ReferenceStorer * rebase * general, changes request by @alcortes * general, changes request by @alcortes
* utils/fs: added test for open-read-seek. (#117)v4.0.0-rc3Santiago M. Mola2016-11-071-1/+24
| | | | Previously we tested only seek on created files, not opened.
* utils/fs: Fix O_CREATE flag check in OpenFile (#116)Pierre Guilleminot2016-11-072-1/+9
| | | | | | * utils/fs: Fix O_CREATE flag check in OpenFile * utils/fs/os: test that Open does not create dirs.
* clients: common, initialize Refs in GitUploadPackInfoMáximo Cuadros2016-11-051-1/+4
|
* fixtures: Add missing ObjectsCount (#115)v4.0.0-rc2Antonio Navarro Perez2016-11-041-0/+1
|
* add Blobs, Trees and Objects iters. (#114)Santiago M. Mola2016-11-049-119/+440
| | | | | * Now every object type as an iterator in Repository. * old TreeIter is TreeWalker again, TreeIter now matches the same behaviour as other iterators.
* fixtures: Add DotGitHash to tags repository (#113)Antonio Navarro Perez2016-11-041-1/+2
|
* storage: filesystem fix testsMáximo Cuadros2016-11-041-1/+1
|
* utils: fs, new memory filesystem (#108)Máximo Cuadros2016-11-0412-12/+442
| | | | | | | | * utils: fs, new memory filesystem * utils: fs, renamed os.NewOS to os.New * utils: fs, memory changes requested by @alcortes
* storage/filesystem: implement missing functionality. (#110)Santiago M. Mola2016-11-0311-94/+241
| | | | | | | * storage/filesystem: added ObjectStorage Set. * storage/filesystem: now passes all tests, except those specific to transactions. * formats/config: Encoder now encodes subsections with no options. * formats/config: add HasSubsection on Section. * dotgit: add Ref method to get specific reference.
* fix package documentation (#109)weirdgiraffe2016-11-031-22/+23
| | | update example code to actual go-git.v4
* ulreq: adds encoder and decoder for upload-request messages (#106)Alberto Cortés2016-11-028-34/+1493
| | | | | | * ulreq: adds encoder and decoder for upload-request messages * ulreq: stop using _test suffix for testing package names (@mcuadros comment)
* format: index encoder and index decoder improvements (#105)Máximo Cuadros2016-10-316-78/+362
|
* utils/fs: add OpenFile method to filesystem interface. (#104)Santiago M. Mola2016-10-313-52/+163
| | | | | | | | | | | | * utils/fs: add OpenFile method to filesystem interface. * added OpenFile to fs.Filesystem interface. * added OpenFile implementation to 'os' filesystem. * bring back BaseFile. * utils/fs/os: do not use wildcard import. * utils/fs/os: implement Open and Create using OpenFile.
* utils: binary, new package that collect all the spare helper functions about ↵Máximo Cuadros2016-10-318-224/+340
| | | | binary operations (#102)
* Fix ssh workflow (#96)Alberto Cortés2016-10-272-52/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix #80 We were sending an additional `\n` to the server when sending the upload request, see clients/ssh/git_upload_pack.go:174: fmt.Fprintln(si, r.String()) The reason for this was to flush the input stream, otherwise, the message was not send to the server. Also, we were (and still are) not checking remote execution errors, so we were unaware of this error, reading the first portion of the packfile as if nothing were wrong. On the few ocasions when the server was quick enough to fail before sending the full packfile, one of our tests (the one that checks the received packfile size) failed. We were also escaping the repository name in the remote command execution string incorrectly. Now we are: - using ssh.Run to run the remote command, instead of start and wait, which is the same but simpler. - using io.Copy instead of fmt.Fprintln, so we avoid adding and extra EOL and also we don't use a line buffered stream. and we no longer have to flush it. - we are closing the input stream as soon as possible, so the remote command can exit also as soon as possible. - the remote command escape character (') is used correctly * WIP * ssh: return remote command exit value when closing the packfile stream
* remote, fix fetch tagsMáximo Cuadros2016-10-276-22/+44
|
* remote, fix copy tag reference on fetchMáximo Cuadros2016-10-262-6/+44
|
* storage: filesystem fix config on new repositories (#100)Máximo Cuadros2016-10-262-24/+56
|
* formats/config: Added encoder/decoder for git config files. (#97)Santiago M. Mola2016-10-2614-54/+1017
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WIP: Add config format parser. * add decoder based on gcfg. Portions of code taken from: https://github.com/go-gcfg/gcfg/blob/5b9f94ee80b2331c3982477bd84be8edd857df33/read.go * add git config encoder and config methods. * use format/config in storage/filesystem for read * use format/config in storage/filesystem to write * formats/config: improve docs. * formats/config: improve tests. * formats/config: use our fork of gcfg; improve api. * formats/config: improve api. * storage/filesystem: fix gofmt * formats/config: use NoSubsection constant. * formats/config: add doc.go * formats/config: requested sytle changes. * formats/config: do not use *_test packages.
* fix fixtures usageMáximo Cuadros2016-10-264-5/+5
|
* Use advrefs in gituploadpackinfo (#92)Alberto Cortés2016-10-2620-636/+2946
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* utils/fs/test: add testing of stat on subdirs. (#99)Santiago M. Mola2016-10-261-0/+18
| | | | * Some 3rd party implementations had bugs on this that went unnoticed.
* formats: Index read support (#91)Máximo Cuadros2016-10-265-0/+1069
| | | | | | | | | | | | | | | | | | | | | | | | | | * utils: fs generic TestSuite * fs: fs.TempFile * utils: fs small changes requested * utils: fs, test fs.Create overwriting files * formats: index, basic v2 reader * formats: index, tree extension support * formats: index, stage decoding * formats: index, extended flags, v3 support * formats: index, v4 support * formats: index, Resolve undo support * formats: index, fix error when decoding invalidated entries * formats: index, fix style issues
* utils/fs: add test for create file in dir. (#95)Santiago M. Mola2016-10-251-0/+8
| | | | | | * Ensure that files can be created in a FS returned by Dir(). * Files created in a dir fs should have Filename() relative to dir's base.
* utils/fs: add Remove(). (#94)Santiago M. Mola2016-10-243-0/+28
|
* utils/fs: move 'os' and 'test' to separate packages. (#93)Santiago M. Mola2016-10-2410-115/+108
| | | | | | * create utils/fs/test package to expose generic test suite to 3rd party fs implementations. * move 'os' to its own package to avoid cyclic dependency (test -> fs -> test, becomes test -> fs, os -> test, os -> fs). * remove TestCreateAndWrite: some of our implementations cannot read a file that was just created, written and not closed yet.
* Fix pktline api (#89)v4.0.0-rc1Alberto Cortés2016-10-196-349/+408
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change pktline API so you can add payloads The old pktline API only had one method: New, that receives the payloads and return the new PktLine, that was an io.Reader. This means you have to prepare the contents beforehand, in a [][]byte and then call the ctor to build the pktlines. Now, the construction of the pktlines and the method to add payloads are separated: New() // creates an empty PktLines AddFlush() Add(pp ...[]byte) AddString(pp ...string) and a PktLines has a public member R, which is the io.Reader of the pktlines added. * metalinter * change package name from pktlines to pktline * change package name from pktlines to pktline for true * make pktlines a reader instead of have a reader
* OSFile: implement io.ReaderAt. (#90)Santiago M. Mola2016-10-191-0/+4
|
* utils: fs.TempFile (#88)Máximo Cuadros2016-10-195-159/+236
| | | | | | | | | | * utils: fs generic TestSuite * fs: fs.TempFile * utils: fs small changes requested * utils: fs, test fs.Create overwriting files
* do not assume remotes are sorted chronologically (#87)Alberto Cortés2016-10-181-2/+8
|
* Substitute old pktline encoder/decoder with new pktline scanner (#84)Alberto Cortés2016-10-1813-417/+723
| | | | | | | | | | | | | | | | * replace old pktline package with new pktline scanner * remove error checks on pktline.NewFromString * fix deppend bug * reduce memory garbage when pktline.NewFromStrings * improve int to hex conversion to help gc * make intToHex func private * clean function names
* travis: fix ssh keyMáximo Cuadros2016-10-182-2/+1
|
* travis: install_keyMáximo Cuadros2016-10-181-0/+1
|
* travis: install_keyMáximo Cuadros2016-10-182-5/+6
|
* travis: skip decrypt on prsMáximo Cuadros2016-10-181-1/+2
|
* fix a typo in readme (#83)ferhat elmas2016-10-071-1/+1
| | | * s/shorted/sorted/
* fix travisMáximo Cuadros2016-09-294-4/+6
|
* force import from gokpg.inMáximo Cuadros2016-09-291-1/+1
|