diff options
Diffstat (limited to 'Limit.hs')
-rw-r--r-- | Limit.hs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -88,3 +88,10 @@ addCopies num = handle n (Just (key, _)) = do us <- keyLocations key return $ length us >= n + +{- Adds a limit to skip files not using a specified key-value backend. -} +addInBackend :: String -> Annex () +addInBackend name = addLimit $ Backend.lookupFile >=> check + where + wanted = Backend.lookupBackendName name + check = return . maybe False ((==) wanted . snd) |