aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile/encoder.go
Commit message (Collapse)AuthorAgeFilesLines
* config: support a configurable, and turn-off-able, pack.windowJeremy Stribling2017-09-111-9/+14
| | | | | | | | | | | | | | | | | | | | 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).
* storage: reuse deltas from packfilesSantiago M. Mola2017-07-271-11/+18
| | | | | | | | | | | | | | | | | | | * plumbing: add DeltaObject interface for EncodedObjects that are deltas and hold additional information about them, such as the hash of the base object. * plumbing/storer: add DeltaObjectStorer interface for object storers that can return DeltaObject. Note that calls to EncodedObject will never return instances of DeltaObject. That requires explicit calls to DeltaObject. * storage/filesystem: implement DeltaObjectStorer interface. * plumbing/packfile: packfile encoder now supports reusing deltas that are already computed (e.g. from an existing packfile) if the storage implements DeltaObjectStorer. Reusing deltas boosts performance of packfile generation (e.g. on push).
* project: move imports from srcd.works to gopkg.inAntonio Jesus Navarro Perez2017-03-071-3/+3
| | | | To be able to fix #261 we will move again to gopkg.in before v4 stable release.
* plumbing: improve documentation (Fix #242)Antonio Jesus Navarro Perez2017-02-231-1/+2
|
* new srcd.works/go-git.v4 pathMáximo Cuadros2017-01-301-3/+3
|
* Fix some typos in plumbing docs (#244)Sergio Arbeo2017-01-301-1/+1
|
* packfile: delta selection logic (#182)Antonio Navarro Perez2016-12-161-44/+46
| | | | | | | | | | * packfile: delta selection logic - Implemented logic to assign deltas to objects * Requested changes * Improved tests and fix errors
* move plumbing from top level package to plumbing (#183)Santiago M. Mola2016-12-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* format/packfile: implement delta encoding (#172)Antonio Navarro Perez2016-12-141-14/+78
| | | | | | | | | | | | * format/packfile: implement delta encoding - Added all the logic to the encoder to be able to encode ref-delta and offset-delta objects - Created plumbing.ObjectToPack to handle deltas and standard objects when we are writting them into a packfile - Added specific encoder delta tests, one standard object and one delta, and one standard object and two deltas * Requested changes. * Requested changes
* plumbing/packfile: PACK encoder (#131)Antonio Navarro Perez2016-11-241-0/+116
* plumbing/packfile: PACK encoder - Added simple PACK encoder, deltas not supported by now * Requested changes * Requested changes * Requested changes