aboutsummaryrefslogtreecommitdiff
path: root/Annex/FileMatcher.hs
Commit message (Collapse)AuthorAge
* enable LambdaCase and convert around 10% of places that could use itGravatar Joey Hess2017-11-15
| | | | | | | | | | | Needs ghc 7.6.1, so minimum base version increased slightly. All builds are well above this version of ghc, and debian oldstable is as well. Code that could use lambdacase can be found by running: git grep -B 1 'case ' | less and searching in less for "<-" This commit was sponsored by andrea rota.
* AssociatedFile newtypeGravatar Joey Hess2017-03-10
| | | | | | To prevent any further mistakes like 1a497cefb47557f0b4788c606f9071be422b2511 This commit was sponsored by Francois Marier on Patreon.
* securehash matchingGravatar Joey Hess2017-02-27
| | | | | | | Added --securehash option to match files using a secure hash function, and corresponding securehash preferred content expression. This commit was sponsored by Ethan Aubin.
* Avoid backtraces on expected failures when built with ghc 8; only use ↵Gravatar Joey Hess2016-11-15
| | | | | | | | | | | | | backtraces for unexpected errors. ghc 8 added backtraces on uncaught errors. This is great, but git-annex was using error in many places for a error message targeted at the user, in some known problem case. A backtrace only confuses such a message, so omit it. Notably, commands like git annex drop that failed due to eg, numcopies, used to use error, so had a backtrace. This commit was sponsored by Ethan Aubin.
* Include magic database in the linux and OSX standalone builds.Gravatar Joey Hess2016-02-26
|
* Avoid crashing when built with MagicMime support, but when the magic ↵Gravatar Joey Hess2016-02-23
| | | | database cannot be loaded.
* matchexpression: Added --largefiles option to parse an annex.largefiles ↵Gravatar Joey Hess2016-02-03
| | | | expression.
* annex.largefiles: Add support for mimetype=text/* etc, when git-annex is ↵Gravatar Joey Hess2016-02-03
| | | | linked with libmagic.
* Limit annex.largefiles parsing to the subset of preferred content ↵Gravatar Joey Hess2016-02-03
| | | | | | expressions that make sense in its context. So, not "standard" or "lackingcopies", etc.
* simplifyGravatar Joey Hess2016-02-03
|
* refactorGravatar Joey Hess2016-02-03
|
* avoid unnecessary building of a one-off MapGravatar Joey Hess2016-02-03
| | | | A case lookup should be more efficient.
* annex.largefiles can be configured in .gitattributes tooGravatar Joey Hess2016-02-02
| | | | | This is particulary useful for v6 repositories, since the .gitattributes configuration will apply in all clones of the repository.
* add "nothing" to preferred content DSLGravatar Joey Hess2016-02-02
| | | | | Same as "not anything"; will be particularly useful in annex.largefiles gitattributes.
* remove 163 lines of code without changing anything except importsGravatar Joey Hess2016-01-20
|
* avoid unnecessary reading of git-annex branch data when matching on ↵Gravatar Joey Hess2015-12-04
| | | | | | | annex.largefiles This makes git annex clean not look at the git-annex branch at all, and so speeds it up by 50% or more.
* Added new "anything" preferred content expression, which matches all ↵Gravatar Joey Hess2015-06-16
| | | | versions of all files.
* a few hlintsGravatar Joey Hess2015-04-11
|
* relFile does not have to be relative; rename to currFileGravatar Joey Hess2015-02-06
|
* import Data.Default in CommonGravatar Joey Hess2015-01-28
|
* 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.
* reorg matcher types; no non-type code changesGravatar Joey Hess2014-03-29
|
* finish wiring up groupwantedGravatar Joey Hess2014-03-15
|
* "standard" can now be used as a first-class keyword in preferred content ↵Gravatar Joey Hess2014-03-14
| | | | | | | | | | | expressions. For example "standard or (include=otherdir/*)" or even "not standard" Note that the implementation avoids any potential for loops (if a standard preferred content expression itself mentioned standard). This commit was sponsored by Jochen Bartl.
* limiting files based on metadataGravatar Joey Hess2014-02-13
| | | | | | Note that there is currently no caching, so --metadata foo=bar --metadata tag=blah will currently read the log 2x per file.
* random hlint (to give the autobuilder something new to build)Gravatar Joey Hess2014-02-11
|
* fix transfers of key with no associated fileGravatar Joey Hess2014-01-23
| | | | | | | | | | | | | | | | | Several places assumed this would not happen, and when the AssociatedFile was Nothing, did nothing. As part of this, preferred content checks pass the Key around. Note that checkMatcher is sometimes now called with Just Key and Just File. It currently constructs a FileMatcher, ignoring the Key. However, if it constructed a FileKeyMatcher, which contained both, then it might be possible to speed up parts of Limit, which currently call the somewhat expensive lookupFileKey to get the Key. I have not made this optimisation yet, because I am not sure if the key is always the same. Will need some significant checking to satisfy myself that's the case..
* add "unused" preferred content expressionGravatar Joey Hess2014-01-22
| | | | | | | With a really nice optimisation that keeps it from having any overhead in normal operation! This commit was sponsored by Ulises Vitulli.
* benchmarked numcopies .gitattributes in preferred contentGravatar Joey Hess2014-01-21
| | | | | | | | | | | Checking .gitattributes adds a full minute to a git annex find looking for files that don't have enough copies. 2:25 increasts to 3:27. I feel this is too much of a slowdown to justify making it the default. So, exposed two versions of the preferred content expression, a slow one and a fast but approximate one. I'm using the approximate one in the default preferred content expressions to avoid slowing down the assistant.
* Add and use numcopiesneeded preferred content expression.Gravatar Joey Hess2014-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add numcopiesneeded preferred content expression. * Client, transfer, incremental backup, and archive repositories now want to get content that does not yet have enough copies. This means the asssistant will make copies of files that don't yet meet the configured numcopies, even to places that would not normally want the file. For example, if numcopies is 4, and there are 2 client repos and 2 transfer repos, and 2 removable backup drives, the file will be sent to both transfer repos in order to make 4 copies. Once a removable drive get a copy of the file, it will be dropped from one transfer repo or the other (but not both). Another example, numcopies is 3 and there is a client that has a backup removable drive and two small archive repos. Normally once one of the small archives has a file, it will not be put into the other one. But, to satisfy numcopies, the assistant will duplicate it into the other small archive too, if the backup repo is not available to receive the file. I notice that these examples are fairly unlikely setups .. the old behavior was not too bad, but it's nice to finally have it really correct. .. Almost. I have skipped checking the annex.numcopies .gitattributes out of fear it will be too slow. This commit was sponsored by Florian Schlegel.
* improve matcher data type to allow matching Keys, instead of just files (no ↵Gravatar Joey Hess2014-01-18
| | | | behavior changes)
* refactorGravatar Joey Hess2013-10-28
|
* refactorGravatar Joey Hess2013-05-24
|
* per-IA-item content directoriesGravatar Joey Hess2013-04-25
|
* hlintGravatar Joey Hess2013-04-03
|
* New annex.largefiles setting, which configures which files `git annex add` ↵Gravatar Joey Hess2013-03-29
and the assistant add to the annex. I would have sort of liked to put this in .gitattributes, but it seems it does not support multi-word attribute values. Also, making this a single config setting makes it easy to only parse the expression once. A natural next step would be to make the assistant `git add` files that are not annex.largefiles. OTOH, I don't think `git annex add` should `git add` such files, because git-annex command line tools are not in the business of wrapping git command line tools.