diff options
author | Joey Hess <joey@kitenet.net> | 2011-06-01 16:49:17 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-06-01 16:49:17 -0400 |
commit | 3d567aa64f263c6ee55c92e8b962087de063ebc8 (patch) | |
tree | b900a87442363b33fd0fe9cba42923313f283676 /GitAnnex.hs | |
parent | 12e0e95916b81352b6f0dfdf95d3e623d4a12738 (diff) |
Add --numcopies option.
Diffstat (limited to 'GitAnnex.hs')
-rw-r--r-- | GitAnnex.hs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/GitAnnex.hs b/GitAnnex.hs index 99aec187a..37a73424a 100644 --- a/GitAnnex.hs +++ b/GitAnnex.hs @@ -13,6 +13,7 @@ import qualified GitRepo as Git import CmdLine import Command import Options +import Utility import qualified Annex import qualified Command.Add @@ -82,20 +83,23 @@ cmds = concat options :: [Option] options = commonOptions ++ - [ Option ['k'] ["key"] (ReqArg setkey paramKey) - "specify a key to use" - , Option ['t'] ["to"] (ReqArg setto paramRemote) + [ Option ['t'] ["to"] (ReqArg setto paramRemote) "specify to where to transfer content" , Option ['f'] ["from"] (ReqArg setfrom paramRemote) "specify from where to transfer content" , Option ['x'] ["exclude"] (ReqArg addexclude paramGlob) "skip files matching the glob pattern" + , Option ['N'] ["numcopies"] (ReqArg setnumcopies paramNumber) + "override default number of copies" + , Option ['k'] ["key"] (ReqArg setkey paramKey) + "specify a key to use" ] where - setkey v = Annex.changeState $ \s -> s { Annex.defaultkey = Just v } 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 } header :: String header = "Usage: git-annex command [option ..]" |