diff options
author | Joey Hess <joey@kitenet.net> | 2011-11-28 17:37:15 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-11-28 17:45:47 -0400 |
commit | e32ab766b08b9a64bf12fe5ab6bf33f2d82b0fb7 (patch) | |
tree | 8fdccb1bd129e25af9d6ba84bb32e04b40992c1f /Limit.hs | |
parent | 16653132b7f7452b9c3758696093eda0f2d543c1 (diff) |
--inbackend can be used to make git-annex only operate on files whose content is stored using a specified key-value backend.
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) |