summaryrefslogtreecommitdiff
path: root/Command.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-08 17:14:01 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-08 17:14:01 -0400
commit5f8d17ef558ee82e4cf9e75b8d750e90d35731ee (patch)
tree9fe4d61c0713464b7818c4998f5af8f097ae2d48 /Command.hs
parent6a885aacfc549c2504ee847ead806b6f10b991bf (diff)
generalized Annex.Wanted
this should make it easy to use from inside the assistant, where everything is an AssociatedFile.
Diffstat (limited to 'Command.hs')
-rw-r--r--Command.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Command.hs b/Command.hs
index f2b95aa4c..8e7bf9758 100644
--- a/Command.hs
+++ b/Command.hs
@@ -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 )