diff options
author | Joey Hess <joey@kitenet.net> | 2011-09-18 17:47:49 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-09-18 17:47:49 -0400 |
commit | 8a5a92480b9dcf691af1e8c4849cb71c4158b845 (patch) | |
tree | 04a240460520e892532ca8363a71454538e16e6f /GitAnnex.hs | |
parent | 38c0f3eaf86b67d584d4ff30ab15ec2c725a7fad (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 'GitAnnex.hs')
-rw-r--r-- | GitAnnex.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/GitAnnex.hs b/GitAnnex.hs index 6f4e5d492..bb0f85119 100644 --- a/GitAnnex.hs +++ b/GitAnnex.hs @@ -19,6 +19,7 @@ import Types import Types.TrustLevel import qualified Annex import qualified Remote +import qualified Limit import qualified Command.Add import qualified Command.Unannex @@ -97,7 +98,7 @@ options = commonOptions ++ "specify to where to transfer content" , Option ['f'] ["from"] (ReqArg setfrom paramRemote) "specify from where to transfer content" - , Option ['x'] ["exclude"] (ReqArg addexclude paramGlob) + , Option ['x'] ["exclude"] (ReqArg (Limit.exclude) paramGlob) "skip files matching the glob pattern" , Option ['N'] ["numcopies"] (ReqArg setnumcopies paramNumber) "override default number of copies" @@ -113,7 +114,6 @@ options = commonOptions ++ where setto v = Annex.changeState $ \s -> s { Annex.toremote = Just v } setfrom v = Annex.changeState $ \s -> s { Annex.fromremote = Just v } - addexclude v = Annex.changeState $ \s -> s { Annex.exclude = v:Annex.exclude s } setnumcopies v = Annex.changeState $ \s -> s {Annex.forcenumcopies = readMaybe v } setkey v = Annex.changeState $ \s -> s { Annex.defaultkey = Just v } setgitconfig :: String -> Annex () |