s { Annex.limit = CompleteMatcher matcher }
return matcher
+{- Checks if the user-specified limits contains anything that meets the
+ - condition. -}
+introspect :: (MatchFiles Annex -> Bool) -> Annex Bool
+introspect c = any c <$> getMatcher'
+
{- Adds something to the limit list, which is built up reversed. -}
add :: Utility.Matcher.Token (MatchFiles Annex) -> Annex ()
add l = Annex.changeState $ \s -> s { Annex.limit = prepend $ Annex.limit s }
matchMagic _limitname querymagic selectprovidedinfo (Just magic) glob =
Right $ MatchFiles
{ matchAction = const go
- , matchNeedsFileName = False
+ , matchNeedsFileName = True
, matchNeedsFileContent = True
}
where
limitUnused :: MatchFiles Annex
limitUnused = MatchFiles
{ matchAction = go
- , matchNeedsFileName = False
+ , matchNeedsFileName = True
, matchNeedsFileContent = False
}
where
Nothing -> Left "bad size"
Just sz -> Right $ MatchFiles
{ matchAction = go sz
- , matchNeedsFileName = False
+ , matchNeedsFileName = case lb of
+ LimitAnnexFiles -> False
+ LimitDiskFiles -> True
, matchNeedsFileContent = False
}
where