--inbackend can be used to make git-annex only operate on files whose content is stored using a specified key-value backend.
This commit is contained in:
parent
16653132b7
commit
e32ab766b0
4 changed files with 16 additions and 0 deletions
7
Limit.hs
7
Limit.hs
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue