aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | worktree: solve merge conflictsv4.7.0Máximo Cuadros2018-09-062-3/+70
|\ \ \ \ \
| * | | | | worktree: address PR comments: sort imports appropriatelyMark Bartel2018-07-072-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Mark Bartel <github@spottybenny.ca>
| * | | | | worktree: sort the tree object. Fixes #881Mark Bartel2018-07-031-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Mark Bartel <github@spottybenny.ca>
| * | | | | worktree: add test for correct tree sorting (issue #881)Mark Bartel2018-07-031-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Mark Bartel <github@spottybenny.ca>
* | | | | | Merge pull request #942 from jfontan/improvement/maintain-packfiles-openMáximo Cuadros2018-09-065-2/+131
|\ \ \ \ \ \ | | | | | | | | | | | | | | storage/dotgit: add KeepDescriptors option
| * | | | | | storage/filesystem: compare files using offset in testJavi Fontan2018-09-062-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using equals to compare files it uses diff to do so. This can potentially consume lots of ram. Changed the comparison to use file offsets. If the descriptor is reused the offset is maintained. Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * | | | | | storage/filesystem: add KeepDescriptors testJavi Fontan2018-09-053-7/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also delete Close from MockObjectStorage and memory storer. Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * | | | | | plumbing/storer: do not expose Close in EncodedObjectStorer interfaceJavi Fontan2018-09-041-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * | | | | | storage/dotgit: add KeepDescriptors optionJavi Fontan2018-09-047-2/+92
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This option maintains packfile file descriptors opened after reading objects from them. It improves performance as it does not have to be opening packfiles each time an object is needed. Also adds Close to EncodedObjectStorer to close all the files manualy. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* | | | | | Merge pull request #941 from jfontan/improvement/static-modeMáximo Cuadros2018-09-046-9/+260
|\ \ \ \ \ \ | | | | | | | | | | | | | | plumbing/storer: add ExclusiveAccess option to Storer
| * | | | | | storage/dotgit: add ExclusiveAccess tests in dotgitJavi Fontan2018-09-041-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This functionality was already tested in storage/filesystem. The coverage tool only takes into account files from the same package of the test. Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * | | | | | storage/filesystem: move Options to filesytem and dotgitJavi Fontan2018-09-035-32/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
| * | | | | | 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 #939 from ↵Máximo Cuadros2018-09-042-2/+6
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | keybase/taruti/cherrypick-for-upstream-clamp-object-timestamp Clamp object timestamps before unix epoch to unix epoch
| * | | | | | | plumbing: object: Clamp object timestamps before unix epoch to unix epochTaru Karttunen2018-08-292-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Taru Karttunen <taruti@taruti.net>
* | | | | | | | Merge pull request #937 from zaquestion/comment_charMáximo Cuadros2018-08-302-0/+7
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | config: add commentChar to core config struct
| * | | | | | | | config: add commentChar to core config structZaq? Wiedmann2018-08-292-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Zaq? Wiedmann <zaquestion@gmail.com>
* | | | | | | | | Merge pull request #933 from kuba--/fix-895/clean-dirMáximo Cuadros2018-08-293-16/+62
|\ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / |/| | | | | | | | Remove empty dirs when cleaning with Dir opt.
| * | | | | | | | Add Status.IsUntracked functionkuba--2018-08-292-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: kuba-- <kuba@sourced.tech>
| * | | | | | | | Remove empty dirs when cleaning with Dir opt.kuba--2018-08-293-32/+89
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: kuba-- <kuba@sourced.tech>
* | | | | | | | 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>
| | | * | | | git: s/TagObjectOptions/CreateTagOptions/Chris Marchesi2018-09-073-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just renaming the TagObjectOptions type to CreateTagOptions so that it's consistent with the other option types. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
| | | * | | | git: Add some tests for annotated tag deletionChris Marchesi2018-09-071-3/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a couple of tests for annotated tag deletion: * The first one is a general test and should work regardless of the fixture used - the tag object could possibly be packed, so we do a prune *and* a repack operation before testing to see if the object was GCed correctly. * The second one actually creates the tag to be deleted, so that the tag object gets created as a loose, unpacked object. This is so we can effectively test that purning unpacked objects is now working 100% correctly (this was failing before because tag objects were not supported for walking). Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
| | | * | | | git: Don't touch tag objects orphaned by tag deletionChris Marchesi2018-09-071-16/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deleting a tag ref for an annotated tag in normal git behavior does not delete the tag object right away. This is handled by the normal GC process. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
| | | * | | | git: Add Tag objects to the list of supported objects for walkingChris Marchesi2018-09-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is necessary to support pruning on Tag objects. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
| | | * | | | git: s/fetch/returns/ on Tag function docChris Marchesi2018-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is to avoid any ambiguity with the act of "fetching" in git in general. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
| | | * | | | git: Don't return tag object with Tag, adjust docs for Tag and TagsChris Marchesi2018-08-232-50/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've mainly noticed that in using the current Tag function, that there were lots of times that I was ignoring the ref or the object, depending on what I needed. This was evident in the tests as well. As such, I think it just makes more sense for a singular tag fetcher to return just a ref, through which the caller may grab the annotation if they need it, and if it exists. Also, contrary to the docs on Tags, all tags have a ref, even if they are annotated. The difference between a lightweight tag and an annotated tag is the presence of the tag object, which the ref will point to if the tag is annotated. As such I've adjusted the docs with an example as to how one can get the annotation for a tag ref through the iterator. Source: https://git-scm.com/book/en/v2/Git-Internals-Git-References, tags section. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
| | | * | | | git: Discern tag target type from supplied hashChris Marchesi2018-08-233-41/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I figured there was a way to do this without having to have TagObjectOptions supply this in - there is. Added support for this in and removed the object type from TagObjectOptions. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
| | | * | | | git: Replace test signing key with one with longer expiryChris Marchesi2018-08-211-53/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old one was created with defaults, which would have caused CI failures in 2 years. The new one is valid for 10 years: > gpg --list-secret-keys /root/.gnupg/pubring.kbx ------------------------ sec rsa4096 2018-08-22 [SC] [expires: 2028-08-19] 93A17FF01E54328546087C8E029395402EFCCD53 uid [ unknown] foo bar <foo@foo.foo> Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
| | | * | | | git: Canonicalize incoming annotated tag messagesChris Marchesi2018-08-212-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tag messages are highly sensitive to being in the expected format, especially when encoding/decoding for PGP verification. As such, we do a simple trimming of whitespace on the incoming message and add a newline on the end, to ensure there are no surprises here. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
| | | * | | | plumbing: object, don't add extra newline on PGP signatureChris Marchesi2018-08-211-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tag encoding/decoding seems to be a lot more sensitive to requiring the exact expected format in the object, which generally includes messages canonicalized so that they have a newline on the end (even if they didn't before). As such, the message should be written with the newline (no need for an extra), and the PGP signature right after that, which will be newline split already, so there's no need to split it again. All of this means it's very important for the caller to send the message in the correct format - which I'm correcting in the next commit. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
| | | * | | | plumbing: object, correct tag PGP encodingChris Marchesi2018-08-211-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As with the update in ec3d2a8, tag encoding needed to be corrected to ensure extra newlines were not being added in during tag object encoding, so that it did not corrupt the object for verification. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>