diff options
Diffstat (limited to 'GitAnnex.hs')
-rw-r--r-- | GitAnnex.hs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/GitAnnex.hs b/GitAnnex.hs index 37a73424a..64b0888b0 100644 --- a/GitAnnex.hs +++ b/GitAnnex.hs @@ -14,6 +14,7 @@ import CmdLine import Command import Options import Utility +import TrustLevel import qualified Annex import qualified Command.Add @@ -83,7 +84,9 @@ cmds = concat options :: [Option] options = commonOptions ++ - [ Option ['t'] ["to"] (ReqArg setto paramRemote) + [ Option ['k'] ["key"] (ReqArg setkey paramKey) + "specify a key to use" + , Option ['t'] ["to"] (ReqArg setto paramRemote) "specify to where to transfer content" , Option ['f'] ["from"] (ReqArg setfrom paramRemote) "specify from where to transfer content" @@ -91,8 +94,12 @@ options = commonOptions ++ "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" + , Option [] ["trust"] (ReqArg (settrust Trusted) paramRemote) + "override trust setting" + , Option [] ["semitrust"] (ReqArg (settrust SemiTrusted) paramRemote) + "override trust setting back to default value" + , Option [] ["untrust"] (ReqArg (settrust UnTrusted) paramRemote) + "override trust setting to untrusted" ] where setto v = Annex.changeState $ \s -> s { Annex.toremote = Just v } @@ -100,6 +107,7 @@ options = commonOptions ++ 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 } + settrust t v = Annex.changeState $ \s -> s { Annex.forcetrust = (v, t):(Annex.forcetrust s) } header :: String header = "Usage: git-annex command [option ..]" |