summaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-09-18 17:47:49 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-09-18 17:47:49 -0400
commit8a5a92480b9dcf691af1e8c4849cb71c4158b845 (patch)
tree04a240460520e892532ca8363a71454538e16e6f /Annex.hs
parent38c0f3eaf86b67d584d4ff30ab15ec2c725a7fad (diff)
refactor --exclude to use Utility.Matcher
This should change no behavior, but opens the poissibility to use the matcher for other sorts of limits on which files git-annex processes.
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Annex.hs b/Annex.hs
index 2c8ea1d61..ad65e05dd 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -31,6 +31,7 @@ import Types.Crypto
import Types.BranchState
import Types.TrustLevel
import Types.UUID
+import qualified Utility.Matcher
-- git-annex's monad
newtype Annex a = Annex { runAnnex :: StateT AnnexState IO a }
@@ -59,7 +60,7 @@ data AnnexState = AnnexState
, defaultkey :: Maybe String
, toremote :: Maybe String
, fromremote :: Maybe String
- , exclude :: [String]
+ , limit :: Either [Utility.Matcher.Token (FilePath -> Annex Bool)] (Utility.Matcher.Matcher (FilePath -> Annex Bool))
, forcetrust :: [(UUID, TrustLevel)]
, trustmap :: Maybe TrustMap
, cipher :: Maybe Cipher
@@ -83,7 +84,7 @@ newState gitrepo = AnnexState
, defaultkey = Nothing
, toremote = Nothing
, fromremote = Nothing
- , exclude = []
+ , limit = Left []
, forcetrust = []
, trustmap = Nothing
, cipher = Nothing