summaryrefslogtreecommitdiff
path: root/Types/Key.hs
Commit message (Collapse)AuthorAge
* AssociatedFile newtypeGravatar Joey Hess2017-03-10
| | | | | | To prevent any further mistakes like 1a497cefb47557f0b4788c606f9071be422b2511 This commit was sponsored by Francois Marier on Patreon.
* improve layoutGravatar Joey Hess2017-03-01
|
* Fix reversion in yesterday's release that made SHA1E and MD5E backends not work.Gravatar Joey Hess2017-03-01
|
* add cryptographicallySecureGravatar Joey Hess2017-02-27
| | | | | | | | | | | Note that GPGHMAC keys are not cryptographically secure, because their content has no relation to the name of the key. So, things that use this function to avoid sending keys to a remote will need to special case in support for those keys. If GPGHMAC keys were accepted as cryptographically secure, symlinks using them could be committed to a git repo, and their content would be accepted into the repo, with no guarantee that two repos got the same content, which is what we're aiming to prevent.
* add KeyVariety typeGravatar Joey Hess2017-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Where before the "name" of a key and a backend was a string, this makes it a concrete data type. This is groundwork for allowing some varieties of keys to be disabled in file2key, so git-annex won't use them at all. Benchmarks ran in my big repo: old git-annex info: real 0m3.338s user 0m3.124s sys 0m0.244s new git-annex info: real 0m3.216s user 0m3.024s sys 0m0.220s new git-annex find: real 0m7.138s user 0m6.924s sys 0m0.252s old git-annex find: real 0m7.433s user 0m7.240s sys 0m0.232s Surprising result; I'd have expected it to be slower since it now parses all the key varieties. But, the parser is very simple and perhaps sharing KeyVarieties uses less memory or something like that. This commit was supported by the NSF-funded DataLad project.
* factor non-type stuff out of KeyGravatar Joey Hess2017-02-24
|
* make file2key reject E* backend keys with a long extensionGravatar Joey Hess2017-02-24
| | | | | | | | | | | | | | | | | | | | I am not happy that I had to put backend-specific code in file2key. But it would be very difficult to avoid this layering violation. Most of the time, when parsing a Key from a symlink target, git-annex never looks up its Backend at all, so adding this check to a method of the Backend object would not work. The Key could be made to contain the appropriate Backend, but since Backend is parameterized on an "a" that is fixed to the Annex monad later, that would need Key to change to "Key a". The only way to clean this up that I can see would be to have the Key contain a LowlevelBackend, and put the validation in LowlevelBackend. Perhaps later, but that would be an extensive change, so let's not do it in this commit which may want to cherry-pick to backports. This commit was sponsored by Ethan Aubin.
* Tighten key parser to not accept keys containing a non-numeric fields, which ↵Gravatar Joey Hess2017-02-24
| | | | | | | | | could be used to embed data useful for a SHA1 attack against git. Also todo about why this is important, and with some further hardening to add. This commit was sponsored by Ignacio on Patreon.
* implementation of peer-to-peer protocolGravatar Joey Hess2016-11-17
| | | | | | | | | | | | | | | | For use with tor hidden services, and perhaps other transports later. Based on Utility.SimpleProtocol, it's a line-based protocol, interspersed with transfers of bytestrings of a specified size. Implementation of the local and remote sides of the protocol is done using a free monad. This lets monadic code be included here, without tying it to any particular way to get bytes peer-to-peer. This adds a dependency on the haskell package "free", although that was probably pulled in transitively from other dependencies already. This commit was sponsored by Jeff Goeke-Smith on Patreon.
* improved use of Aeson for JSONActionItemGravatar Joey Hess2016-07-26
|
* remove 163 lines of code without changing anything except importsGravatar Joey Hess2016-01-20
|
* fix use of hifalutin terminologyGravatar Joey Hess2015-11-16
|
* use bloom filter in second pass of sync --all --contentGravatar Joey Hess2015-06-16
| | | | | | | | This is needed because when preferred content matches on files, the second pass would otherwise want to drop all keys. Using a bloom filter avoids this, and in the case of a false positive, a key will be left undropped that preferred content would allow dropping. Chances of that happening are a mere 1 in 1 million.
* instance Hashable Key for bloomfilterGravatar Joey Hess2015-06-16
|
* fromkey, registerurl: Improve handling of urls that happen to also be ↵Gravatar Joey Hess2015-05-30
| | | | parsable as strange keys.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* fix some mixed space+tab indentationGravatar Joey Hess2014-10-09
| | | | | | | | | This fixes all instances of " \t" in the code base. Most common case seems to be after a "where" line; probably vim copied the two space layout of that line. Done as a background task while listening to episode 2 of the Type Theory podcast.
* S3: support chunkingGravatar Joey Hess2014-08-02
| | | | | | | The assistant defaults to 1MiB chunk size for new S3 special remotes. Which will work around a couple of bugs: http://git-annex.branchable.com/bugs/S3_memory_leaks/ http://git-annex.branchable.com/bugs/S3_upload_not_using_multipart/
* resume interrupted chunked downloadsGravatar Joey Hess2014-07-27
| | | | | | | | | | | | | | | | | | Leverage the new chunked remotes to automatically resume downloads. Sort of like rsync, although of course not as efficient since this needs to start at a chunk boundry. But, unlike rsync, this method will work for S3, WebDAV, external special remotes, etc, etc. Only directory special remotes so far, but many more soon! This implementation will also properly handle starting a download from one remote, interrupting, and resuming from another one, and so on. (Resuming interrupted chunked uploads is similarly doable, although slightly more expensive.) This commit was sponsored by Thomas Djärv.
* use same hash directories for chunked key as are used for its parentGravatar Joey Hess2014-07-25
| | | | | | | | | | | This avoids a proliferation of hash directories when using new-style chunking, and should improve performance since chunks are accessed in sequence and so should have a common locality. Of course, when a chunked key is encrypted, its hash directories have no relation to the parent key. This commit was sponsored by Christian Kellermann.
* add chunk metadata to KeyGravatar Joey Hess2014-07-24
| | | | | | | | Added new fields for chunk number, and chunk size. These will not appear in normal keys ever, but will be used for chunked data stored on special remotes. This commit was sponsored by Jouni K Seppanen.
* thought of another way to break prop_idempotent_key_decodeGravatar Joey Hess2014-03-05
|
* quickcheck says: "a-s--a" is not a legal key filenameGravatar Joey Hess2014-03-05
| | | | | | | | | | Found this in failed armhf build log, where quickcheck found a way to break prop_idempotent_key_decode. The "s" indicates size, but since nothing comes after it, that's not valid. When encoding the resulting key, no size was present, so it encoded to "a--a". Also, "a-sX--a" is not legal, since X is not a number. Not found by quickcheck.
* file2key should return Nothing if the backend is emptyGravatar Joey Hess2013-11-11
| | | | This failed a quickcheck test on the filename "-a"
* tighten file2key to not produce invalid keys with no keyNameGravatar Joey Hess2013-10-16
| | | | | | A file named "foo-" or "foo-bar" was taken as a key's file, with a backend of "foo", and an empty keyName. This led to various problems, especially because converting that key back to a file did not yeild the same filename.
* add - and _Gravatar Joey Hess2013-09-11
|
* Fix problem with test suite in non-unicode locale.Gravatar Joey Hess2013-09-11
|
* layoutGravatar Joey Hess2013-07-04
|
* moved AssociatedFile definitionGravatar Joey Hess2013-07-04
|
* improve importsGravatar Joey Hess2013-02-27
|
* move Arbitrary instances out of Test and into modules that define the typesGravatar Joey Hess2013-02-27
| | | | This is possible now that we build-depend on QuickCheck.
* where indentingGravatar Joey Hess2012-11-11
|
* git-annex-shell transferinfo commandGravatar Joey Hess2012-09-21
| | | | | TODO: Use this when running sendkey, to feed back transfer info from the client side rsync.
* add routes to pause/start/cancel transfersGravatar Joey Hess2012-08-08
| | | | | | | | | | | | | | | | This commit includes a paydown on technical debt incurred two years ago, when I didn't know that it was bad to make custom Read and Show instances for types. As the routes need Read and Show for Transfer, which includes a Key, and deriving my own Read instance of key was not practical, I had to finally clean that up. So the compact Key read and show functions are now file2key and key2file, and Read and Show are now derived instances. Changed all code that used the old instances, compiler checked. (There were a few places, particularly in Command.Unused, and the test suite where the Show instance continue to be used for legitimate comparisons; ie show key_x == show key_y (though really in a bloom filter))
* rename readMaybe to readishGravatar Joey Hess2012-01-23
| | | | a stricter (but also partial) readMaybe is getting added to base
* factor out common importsGravatar Joey Hess2011-10-03
| | | | no code changes
* hlint tweaksGravatar Joey Hess2011-07-15
| | | | Did all sources except Remotes/* and Command/*
* rename modules for data types into Types/ directoryGravatar Joey Hess2011-06-01