From 5f8d17ef558ee82e4cf9e75b8d750e90d35731ee Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 8 Oct 2012 17:14:01 -0400 Subject: generalized Annex.Wanted this should make it easy to use from inside the assistant, where everything is an AssociatedFile. --- Command.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Command.hs') 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 ) -- cgit v1.2.3