import --no-content: Check annex.largefiles

Import small files into git, the same as is done when importing with content.
Which means, for small files, --no-content does download them.

If the largefiles expression needs the file content available
(due to mimetype or mimeencoding being used), the import will fail.

This commit was sponsored by Jake Vosloo on Patreon.
This commit is contained in:
Joey Hess 2020-09-28 13:22:16 -04:00
parent 8b74f01a26
commit 15c1ee16d9
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 106 additions and 53 deletions

View file

@ -27,6 +27,7 @@ module Utility.Matcher (
matchMrun,
isEmpty,
combineMatchers,
introspect,
prop_matcher_sane
) where
@ -147,6 +148,10 @@ combineMatchers a b
| isEmpty b = a
| otherwise = a `MOr` b
{- Checks if anything in the matcher meets the condition. -}
introspect :: (a -> Bool) -> Matcher a -> Bool
introspect = any
prop_matcher_sane :: Bool
prop_matcher_sane = all (\m -> match dummy m ()) $ map generate
[ [Operation True]