aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* storage/filesystem: make Storage options privateJavi Fontan2018-09-031-2/+2
| | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
* plumbing/storer: rename Static option to ExclusiveAccessJavi Fontan2018-08-313-8/+9
| | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
* git: do not expose storage options in PlainOpenJavi Fontan2018-08-313-27/+1
| | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
* dotgit: fix typo in commentJavi Fontan2018-08-301-1/+1
| | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
* git, storer: use a common storer.Options for storer and PlainOpenJavi Fontan2018-08-307-38/+33
| | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
* git: add Static option to PlainOpenJavi Fontan2018-08-306-10/+249
| | | | | | | | | | | | | | | | Also adds Static configuration to Storage and DotGit. This option means that the git repository is not expected to be modified while open and enables some optimizations. Each time a file is accessed the storer tries to open an object file for the requested hash. When this is done for a lot of objects it is expensive. With Static option a list of object files is generated the first time an object is accessed and used to check if exists instead of using system calls. A similar optimization is done for packfiles. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* Merge pull request #935 from jfontan/improvement/cache-incoming-directoryMáximo Cuadros2018-08-291-18/+36
|\ | | | | storage/dotgit: search for incoming dir only once
| * storage/dotgit: use HasPrefix instead of SplitJavi Fontan2018-08-271-6/+9
| | | | | | | | | | | | Also reformatted function comment and fixed some typos. Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * storage/dotgit: search for incoming dir only onceJavi Fontan2018-08-251-13/+28
|/ | | | | | | | | Search for incoming object directory was done once each time objects were accessed. This means a ReadDir of the objects path that is expensive. Now incoming directory is searched the first time an object is accessed and its name kept in DotGit to be reused. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* Merge pull request #929 from jfontan/fix/reuse-base-cacheMáximo Cuadros2018-08-233-2/+41
|\ | | | | plumbing, storage: add bases to the common cache
| * plumbing, storage: add bases to the common cacheJavi Fontan2018-08-223-2/+41
|/ | | | | | | | | | | | After clone only resolved deltas were added to the cache. This caused slowdowns in small repositories where most objects can be held in cache. It also makes packfiles reuse delta cache from the store. Previously it created a new delta cache each time a packfile object was created. This also slowed down a bit accessing objects and had an impact on memory consumption when bases are added to the cache. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* Merge pull request #927 from jfontan/fix/iterate-objects-by-offsetMáximo Cuadros2018-08-223-1/+85
|\ | | | | plumbing/idxfile: object iterators returns entries in offset order
| * plumbing/idxfile: object iterators returns entries in offset orderJavi Fontan2018-08-213-1/+85
|/ | | | | | | | | | | In the latest change the order was changed from offset order in packfiles to hash order. This makes reading all the objects not as efficient as before. It also created problems when the previous order was expected. Also added EntriesByOffset to indexes. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* Merge pull request #887 from noxora/hook-supportMáximo Cuadros2018-08-212-3/+101
|\ | | | | added support for quarantine directory
| * dotgit: fix object delete testSantiago M. Mola2018-08-171-14/+18
| | | | | | | | Signed-off-by: Santiago M. Mola <santi@mola.io>
| * added hook supportnoxora2018-08-162-4/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: noxora <ldecker@indeed.com> trying a possible fix to the delete test Signed-off-by: noxora <ldecker@indeed.com> still trying to fix this test Signed-off-by: noxora <ldecker@indeed.com> fixes did not work, seems to be a windows env problem Signed-off-by: noxora <ldecker@indeed.com>
* | Merge pull request #921 from jfontan/fix/empty-headersMáximo Cuadros2018-08-212-5/+45
|\ \ | | | | | | plumbing/object: fix panic when reading object header
| * | object: fix panic when reading object headerJavi Fontan2018-08-172-5/+45
| | | | | | | | | | | | | | | | | | | | | | | | When the first line of the pgp signature is an empty line or some header is malformed it crashes as there's no data for the header element. For example, if author name is "\n". Signed-off-by: Javi Fontan <jfontan@gmail.com>
* | | Merge pull request #924 from fkorotkov/fedor/fix-issue-923Máximo Cuadros2018-08-202-0/+9
|\ \ \ | |/ / |/| | Fixed an edge case for .gitignore
| * | Fixed an edge case for .gitignoreFedor Korotkov2018-08-192-0/+9
|/ / | | | | | | | | | | Fixes #923 Signed-off-by: Fedor Korotkov <fedor.korotkov@gmail.com>
* | Merge pull request #920 from vancluever/f-add-commit-signkeyv4.6.0Máximo Cuadros2018-08-174-7/+178
|\ \ | | | | | | git: Add ability to PGP sign commits
| * | git: Add extra test for testing bad key error caseChris Marchesi2018-08-161-55/+85
| | | | | | | | | | | | | | | | | | I'm hoping this helps get codecov to a tolerable delta. :) Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
| * | git: Remove old hash validation codeChris Marchesi2018-08-161-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will not work for a signed commit as with the GPG signature being a part of the commit, the hash is now non-deterministic. Verification of the commit is done through the validation of the signature. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
| * | git: Remove use of strings.BuilderChris Marchesi2018-08-162-2/+4
| | | | | | | | | | | | | | | | | | | | | This was added in Go 1.10 and is not supported on Go 1.9. Switched to bytes.Buffer to ensure compatibility. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
| * | git: Add ability to PGP sign commitsChris Marchesi2018-08-163-0/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the ability to sign commits by adding the SignKey field to CommitOptions. If present, the commit will be signed during the WorkTree.Commit call. The supplied SignKey must already be decrypted by the caller. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
| * | plumbing: object, Don't add new line at end of commit signatureChris Marchesi2018-08-161-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way that commit signatures were being written out was causing an extra newline to be written at the end of the commit when the message encoding was already taking care of this. Ultimately, this results in a corrupt object, rendering the object unverifiable with the signature in the commit. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
* | | Merge pull request #916 from ↵Máximo Cuadros2018-08-174-53/+276
|\ \ \ | |/ / |/| | | | | | | | jfontan/improvement/memory-consumption-new-packfile-parser Improvement/memory consumption new packfile parser
| * | plumbing/packfile: do not compute sha1 for already undeltified objectsJavi Fontan2018-08-141-7/+9
| | | | | | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * | plumbing/pacfile: tidy up objectInfo structJavi Fontan2018-08-141-36/+22
| | | | | | | | | | | | | | | | | | | | | | | | * a new hasher is created when needed * delete unused fields * base content is no longer kept in memory Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * | plumbing: add buffer cache and use it in packfile parserJavi Fontan2018-08-144-14/+249
|/ / | | | | | | | | | | | | It uses less memory and is faster as slices don't have to be converted from/to MemoryObject and they are indexed by offset. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* | Merge pull request #906 from src-d/perf/packfile-readsMáximo Cuadros2018-08-1434-1539/+2949
|\ \ | | | | | | Improve packfile reading performance
| * | plumbing: idxfile, Crc32 to CRC32 and return ok from findHashIndexMiguel Molina2018-08-104-23/+23
| | | | | | | | | | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
| * | git: add benchmark for iterating repository objectsMiguel Molina2018-08-101-0/+56
| | | | | | | | | | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
| * | plumbing: packfile, open and close packfile on FSObject readsMiguel Molina2018-08-099-75/+174
| | | | | | | | | | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
| * | storage: filesystem, add PackfileIter benchmark reading object contentMiguel Molina2018-08-091-0/+67
| | | | | | | | | | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
| * | storage: filesystem, close Packfile after iterating objectsMiguel Molina2018-08-092-1/+17
| | | | | | | | | | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
| * | plumbing: packfile, rename DiskObject to FSObjectMiguel Molina2018-08-092-15/+15
| | | | | | | | | | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
| * | storage: filesystem, benchmark PackfileIterMiguel Molina2018-08-092-15/+94
| | | | | | | | | | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
| * | plumbing: packfile, read object content only onceMiguel Molina2018-08-092-7/+40
| | | | | | | | | | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
| * | plumbing: packfile, add Parse benchmarkMiguel Molina2018-08-091-0/+30
| | | | | | | | | | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
| * | plumbing: packfile, allow non-seekable sources on ParserMiguel Molina2018-08-087-180/+235
| | | | | | | | | | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
| * | *: use parser to populate non writable storages and bug fixesMiguel Molina2018-08-0719-1237/+561
| | | | | | | | | | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
| * | Merge pull request #907 from erizocosmico/feature/fix-testsMiguel Molina2018-08-017-45/+116
| |\ \ | | | | | | | | | | | | | | | | plumbing: packfile, fix package tests Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
| | * | plumbing: packfile, fix package testsMiguel Molina2018-07-306-43/+88
| |/ / | | | | | | | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
| * | Merge pull request #904 from jfontan/feature/new-packfile-parserJavi Fontan2018-07-274-32/+132
| |\ \ | | | | | | | | Tests and indexes in packfile decoder
| | * | plumbing/packfile: add index generation to decoderJavi Fontan2018-07-271-7/+25
| | | | | | | | | | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| | * | storage/filesystem: remove duplicated IndexStorageJavi Fontan2018-07-271-15/+0
| | | | | | | | | | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| | * | plumbing/idxfile: test FindHash and writer with 64 bit offsetsJavi Fontan2018-07-272-10/+107
| |/ / | | | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * | Merge pull request #899 from erizocosmico/feature/new-packfileMiguel Molina2018-07-279-38/+723
| |\ \ | | | | | | | | plumbing: packfile, new Packfile representation
| | * | plumbing: packfile, lazy object reads with DiskObjectsMiguel Molina2018-07-276-41/+314
| | | | | | | | | | | | | | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>