generalized Annex.Wanted

this should make it easy to use from inside the assistant, where
everything is an AssociatedFile.
This commit is contained in:
Joey Hess 2012-10-08 17:14:01 -04:00
parent acb8721072
commit fee40dd374
5 changed files with 28 additions and 33 deletions

View file

@ -22,6 +22,7 @@ module Command (
numCopies,
autoCopies,
autoCopiesWith,
checkAuto,
module ReExported
) where
@ -137,3 +138,7 @@ autoCopiesWith file key vs a = do
if length have `vs` needed
then a numcopiesattr
else stop
checkAuto :: Annex Bool -> Annex Bool
checkAuto checker = ifM (Annex.getState Annex.auto)
( checker , return True )