aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing
Commit message (Collapse)AuthorAgeFilesLines
...
* Modify cache to delete more than one item to free spaceJavi Fontan2018-01-162-5/+3
| | | | | | | | | | | The previous version could only delete the oldest used object. If the object to cache was bigger than the space freed it could not be added. Also the decoder adds bases to the cache when they are needed. This change increases the speed creating indexes 2x. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* Clean reconstructed objects outside pack windowJavi Fontan2018-01-111-13/+19
| | | | | | | | | | | Object walk reconstructs delta objects but these are not cleaned up after they got out the pack window. Without this change all reconstructed objects reside in memory. restoreOriginal call is moved before calling Size(). Now we can not guarantee that the object is already undeltified. Signed-off-by: Javi Fontan <javier@sourced.tech>
* fix typoWells Johnston2018-01-081-1/+1
|
* Merge pull request #698 from jfontan/improvement/use-decoder-cacheMáximo Cuadros2017-12-205-58/+106
|\ | | | | plumbing: cache, enforce the use of cache in packfile decoder
| * Exercise NewObjectLRUDefault in testingJavi Fontan2017-12-201-41/+60
| | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * Make DeltaBaseCache privateJavi Fontan2017-12-201-6/+13
| | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * Fix typo and documentation of NewDecoderForTypeJavi Fontan2017-12-201-3/+3
| | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * Enforce the use of cache in packfile decoderJavi Fontan2017-12-204-12/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Decoder object can make use of an object cache to speed up processing. Previously the only way to specify it was changing manually the struct generated by NewDecodeForFile. This lead to some instances to be created without it and penalized performance. Now the cache should be explicitly passed to the constructor function. NewDecoder now creates objects with a cache using the default size. A new helper function was added to create cache objects with the default size as this becomes a common task now: cache.NewObjectLRUDefault() Signed-off-by: Javi Fontan <jfontan@gmail.com>
* | Improve delta reutilizationAntonio Jesus Navarro Perez2017-12-205-29/+152
|/ | | | | | | | | | | - Remove wrong 'if' on delta selector that causes poor delta reutilizations - packfile.Encoder now can write deltas and objects in a non specific order - ObjectToPack now saves the Offset on the packfile to be able to obtain base offset in a recursive manner and write them before the delta itself - Added encoder test to check cyclic delta chains - Check the output packfile hash in all encoder tests Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
* plumbing: transport ssh, ssh_config implementationMáximo Cuadros2017-12-112-12/+107
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* check .ssh/config for host and port overrides; fixes #629Robert Smith2017-12-091-0/+15
|
* format: diff, remove error when two files are empty, submodules are simply ↵Máximo Cuadros2017-12-072-5/+2
| | | | | | ignored Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* object: patch, test patch on submodulesMáximo Cuadros2017-12-071-0/+44
|
* Ignore empty patches when calculating stats (fixes #654)Alexandr Krylovskiy2017-12-041-0/+5
|
* Fix revision solver for branch and tag (#660)Anthony HAMON2017-12-011-3/+3
| | | fix Repository.ResolveRevision for branch and tag
* Merge pull request #672 from ferhatelmas/gofmt-sMáximo Cuadros2017-12-0110-10/+10
|\ | | | | all: gofmt -s
| * all: gofmt -sferhat elmas2017-11-3010-10/+10
| |
* | storer: separate loose and packed object mgmt into optional ifacesJeremy Stribling2017-11-292-36/+25
| | | | | | | | Suggested by mcuadros.
* | plumbing: add `HasEncodedObject` method to StorerJeremy Stribling2017-11-291-0/+9
| | | | | | | | | | | | | | This allows the user to check whether an object exists, without reading all the object data from storage. Issue: KBFS-2445
* | Make object repacking more configurableTaru Karttunen2017-11-292-2/+7
| |
* | Support for repacking objectsTaru Karttunen2017-11-292-0/+9
| |
* | Address CI and move code aroundTaru Karttunen2017-11-291-2/+4
| |
* | First pass of prune designTaru Karttunen2017-11-292-0/+27
| |
* | filesystem: implement PackRefs()Jeremy Stribling2017-11-291-0/+2
|/ | | | | | | | | | Currently this implementation is only valid for kbfsgit, since it assumes some things about the filesystem not being updated during the packing, and about conflict resolution rules. In the future, it would be nice to replace this with a more general one, and move this kbfsgit-optimized implementation into kbfsgit. Issue: KBFS-2517
* all: simplificationferhat elmas2017-11-2915-71/+29
| | | | | | | | | | - 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`
* dotgit: add CheckAndSetReference testsJeremy Stribling2017-11-281-0/+4
|
* Use optionally locking when updating refsTaru Karttunen2017-11-271-0/+1
|
* plumbing/transport: Fix truncated comment in EndpointOri Rawlings2017-11-271-1/+1
|
* all: fixes for ineffective assignferhat elmas2017-11-261-0/+1
|
* plumbing: object/{commit,tag}, encode method with sig optionalSunny2017-11-242-11/+14
| | | | | Adds Commit.encode() and Tag.encode() with optional `includeSig` parameter to include or exclude signature from the encoded object.
* plumbing: object/tag, add signature verificationSunny2017-11-242-0/+94
|
* plumbing: object/tag, add PGPSignature supportSunny2017-11-242-1/+69
|
* Close http.Body reader when neededAntonio Jesus Navarro Perez2017-11-241-1/+3
| | | | If we don't do that, all the goroutines opened by the Body Reader are never closed, causing a 'fatal: morestack on g0' error.
* test: plumbing/object fix Commit.Verify testSunny2017-11-241-2/+3
| | | | | Test was failing because of the relative time zone attached to the commit. Adding a fixed location to the time fixes the issue.
* Merge pull request #653 from darkowlzz/verify-commitMáximo Cuadros2017-11-242-0/+95
|\ | | | | plumbing: object, new Commit.Verify method
| * test: plumbing.object, add test for Commit.VerifySunny2017-11-231-0/+65
| |
| * plumbing: object, add Commit.Verify methodSunny2017-11-231-0/+30
| | | | | | | | | | Commit.Verify() performs PGP verification of a signed commit given an armored keyring.
* | update to go-billy.v4 and go-git-fixtures.v3Máximo Cuadros2017-11-2332-42/+37
| | | | | | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* | plumbing/object: add test for finding tree entryferhat elmas2017-11-221-0/+37
| |
* | plumbing/object: do not eat error on tree decodeferhat elmas2017-11-211-2/+2
|/
* transport: made public all the fields and standardize AuthMethodMáximo Cuadros2017-11-215-55/+59
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* *: add pointer to the new transport.Endpoint structMáximo Cuadros2017-11-2122-101/+82
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: converts Endpoint interface into a structMáximo Cuadros2017-11-212-167/+195
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: git and http, full mocked testsMáximo Cuadros2017-11-202-8/+7
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: git and http, full mocked testsMáximo Cuadros2017-11-206-243/+211
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: ssh, mocked SSH server, fixes #332Máximo Cuadros2017-11-201-16/+108
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: ssh, fixes override HostKeyCallback from DefaultClientMáximo Cuadros2017-11-202-4/+2
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* Merge pull request #647 from ferhatelmas/typo-fixesMáximo Cuadros2017-11-207-10/+10
|\ | | | | examples,plumbing,utils: typo fixes
| * examples,plumbing,utils: typo fixesferhat elmas2017-11-207-10/+10
| |
* | Merge pull request #646 from mcuadros/decode-object-at-fixMáximo Cuadros2017-11-202-4/+29
|\ \ | |/ |/| format: packfile fix DecodeObjectAt when Decoder has type