aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* .travis: add 1.10Máximo Cuadros2018-02-181-0/+1
| | | | | | https://github.com/travis-ci/gimme/issues/132 Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* Merge pull request #749 from irias/masterv4.1.1Máximo Cuadros2018-02-172-2/+43
|\ | | | | plumbing: diff, fix crash when a small ending equal-chunk
| * add test for crashing diffMechiel Lukkien2018-02-161-0/+37
| | | | | | | | | | | | | | this reuses an existing patch, setting context to 6 triggers the bug, becuase of a 5-line trailing equals chunk. Signed-off-by: Mechiel Lukkien <mechiel@ueber.net>
| * fix crash when generating a unified diff with a small ending equal-chunkMechiel Lukkien2018-02-141-2/+6
| | | | | | | | Signed-off-by: Mechiel Lukkien <mechiel@ueber.net>
* | Merge pull request #751 from mcuadros/redirectMáximo Cuadros2018-02-154-10/+56
|\ \ | |/ |/| transport: http, fix services redirecting only info/refs
| * transport: http, fix services redirecting only info/refsMáximo Cuadros2018-02-144-10/+56
| | | | | | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* | Merge pull request #744 from ↵Máximo Cuadros2018-02-133-8/+18
|\ \ | | | | | | | | | | | | jfontan/fix/make-sure-original-data-is-saved-before-creanup plumbing: format/packfile, fix panic retrieving object hash.
| * | plumbing: format/packfile, add SaveOriginalMetadata functionJavi Fontan2018-02-092-5/+9
| | | | | | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * | plumbing: format/packfile, fix panic retrieving object hash.Javi Fontan2018-02-093-4/+10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases the original data is not saved before it is cleaned and forces a panic when it's needed. The change adds ObjectToPack.CleanOriginal to be used to clean original object instead of: object.Original = nil Now when the Original data is freed because it's no longer in the pack window a SetOriginal call is done to make sure that Size, Hash and Size data is not lost. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* | Merge pull request #742 from Labutin/patch-1Máximo Cuadros2018-02-081-2/+2
|\ \ | | | | | | Fix mistyping
| * | Fix mistypingDmitry Labutin2018-02-071-2/+2
|/ / | | | | | | Signed-off-by: Dmitry Labutin <dmitry@labutin.com>
* | Merge pull request #740 from ferhatelmas/shallow-storage-errMáximo Cuadros2018-02-021-1/+1
|\ \ | |/ |/| storage/filesystem/shallow: fix error checking
| * storage/filesystem/shallow: fix error checkingferhat elmas2018-02-011-1/+1
|/ | | | Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
* Merge pull request #731 from jfontan/fix/crash-with-delta-cyclesMáximo Cuadros2018-01-264-2/+56
|\ | | | | plumbing: format/packfile, fix crash with cycle deltas
| * plumbing: format/packfile, check nil objects in ObjectToPackJavi Fontan2018-01-252-8/+12
| | | | | | | | | | | | | | SetOriginal now skips setting resolved values if the provided object is nil. BackToOriginal also skips nil Original objects. Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * plumbing: format/packfile, fix crash with cycle deltasJavi Fontan2018-01-244-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | Resolving cycles relied on ObjectToPack objects having Original. This is no longer true with the changes from #720. This commit changes: * Save original type, hash and size in ObjectToPack * Use SetObject to set both Original and resolved type, hash and size * Restore original object before using BackToOriginal (cycle resolution) * Update encoder test to check this case Signed-off-by: Javi Fontan <jfontan@gmail.com>
* | gofmt -sMáximo Cuadros2018-01-252-3/+3
|/ | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* Merge pull request #724 from jfontan/improvement/buffered-tee-readerMáximo Cuadros2018-01-212-13/+106
|\ | | | | plumbing: packfile, Add a buffer to crc writer
| * plumbing: packfile, Add crc check to scanner test.Javi Fontan2018-01-211-4/+75
| | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * plumbing: packfile, Add a buffer to crc writer.Javi Fontan2018-01-211-9/+31
|/ | | | | | | | | | | crc update with block smaller than 16 bytes uses a slower version of the function. ReadByte is heavily used by zlib inflate so most of the time crc is update byte by byte. A new Flush method is added to the scanner to flush this crc writer cache. It is only called when the Scanner reader is a teeReader. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* Merge pull request #721 from rykov/clone-no-checkoutMáximo Cuadros2018-01-183-1/+25
|\ | | | | Support for clone without checkout (git clone -n)
| * Support for clone without checkoutMichael Rykov2018-01-173-1/+25
|/
* Merge pull request #720 from ↵v4.1.0Máximo Cuadros2018-01-163-6/+24
|\ | | | | | | | | jfontan/improvement/cache-delete-more-than-one-object plumbing: cache, modify cache to delete more than one item to free space
| * Test eviction of more than one objectJavi Fontan2018-01-161-0/+20
| | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * Cache should hold objects the same size as MaxSizeJavi Fontan2018-01-161-1/+1
| | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * 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>
* _examples: branch example improvementsMáximo Cuadros2018-01-154-61/+66
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* Merge pull request #714 from marwan-at-work/branch-minipMáximo Cuadros2018-01-152-12/+56
|\ | | | | add branch add/remove example
| * add branch add/remove examplemarwan-at-work2018-01-092-12/+56
| |
* | Merge pull request #716 from jfontan/fix/memory-leak-packing-objectsMáximo Cuadros2018-01-151-13/+19
|\ \ | | | | | | Clean reconstructed objects outside pack window
| * | 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>
* | Merge pull request #712 from jfontan/fix/set-default-window-sizeMáximo Cuadros2018-01-102-4/+19
|\ \ | |/ |/| Set default pack window size in config
| * Make DefaultPackWindow const public and document itJavi Fontan2018-01-102-5/+7
| | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * Add tests for default config valuesJavi Fontan2018-01-101-0/+9
| | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * Set default pack window size in configJavi Fontan2018-01-091-1/+5
|/ | | | | | | | Config is not initialized with the default window size. Without this the window size is 0 by default and packfile code is unable to generate deltas. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* Merge pull request #710 from wellsjo/patch-1v4.0.0Máximo Cuadros2018-01-081-1/+1
|\ | | | | fix typo
| * fix typoWells Johnston2018-01-081-1/+1
|/
* Merge pull request #700 from jfontan/improvement/support-non-rw-filesystemsMáximo Cuadros2018-01-026-33/+142
|\ | | | | Add a setRef and rewritePackedRefsWhileLocked versions that supports non rw fs
| * Add norwfs version of rewritePackedRefsWhileLockedJavi Fontan2017-12-224-4/+50
| | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * Check reference also in norwfs SetRefJavi Fontan2017-12-221-2/+25
| | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * Add comment to the norwfs version of SetRefJavi Fontan2017-12-211-0/+7
| | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * Add a setRef version that supports non rw fsJavi Fontan2017-12-213-29/+62
| | | | | | | | | | | | | | | | | | There are some filesystems that do not support opening the files in read and write modes at the same time. The method SetRef is split in files with an extra version that only writes the reference. It can be activated with -tags norwfs on building. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* | added DCOMáximo Cuadros2017-12-211-0/+36
| | | | | | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* | remove old .travis folderMáximo Cuadros2017-12-212-9/+0
| | | | | | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* | Merge pull request #698 from jfontan/improvement/use-decoder-cacheMáximo Cuadros2017-12-206-68/+113
|\ \ | | | | | | 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-202-12/+19
| | | | | | | | | | | | 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-205-17/+36
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge pull request #697 from ajnavarro/performance/improve-delta-reusingMáximo Cuadros2017-12-205-29/+152
|\ \ | |/ |/| plumbing: packafile, improve delta reutilization