From 3e0370017f1d018bc6b6f9e2677c8398a9251f70 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 12 Mar 2013 05:05:33 -0400 Subject: [PATCH] linelength --- Crypto.hs | 3 ++- GitAnnex.hs | 11 +++++++---- Limit.hs | 3 ++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Crypto.hs b/Crypto.hs index 21a35ad0b1..2777a9a206 100644 --- a/Crypto.hs +++ b/Crypto.hs @@ -95,7 +95,8 @@ describeCipher (EncryptedCipher _ (KeyIds ks)) = {- Encrypts a Cipher to the specified KeyIds. -} encryptCipher :: Cipher -> KeyIds -> IO StorableCipher encryptCipher (Cipher c) (KeyIds ks) = do - let ks' = nub $ sort ks -- gpg complains about duplicate recipient keyids + -- gpg complains about duplicate recipient keyids + let ks' = nub $ sort ks encipher <- Gpg.pipeStrict ([ Params "--encrypt" ] ++ recipients ks') c return $ EncryptedCipher encipher (KeyIds ks') where diff --git a/GitAnnex.hs b/GitAnnex.hs index 0b4a7f8d9e..78b3743587 100644 --- a/GitAnnex.hs +++ b/GitAnnex.hs @@ -147,11 +147,11 @@ options :: [Option] options = Option.common ++ [ Option ['N'] ["numcopies"] (ReqArg setnumcopies paramNumber) "override default number of copies" - , Option [] ["trust"] (ReqArg (Remote.forceTrust Trusted) paramRemote) + , Option [] ["trust"] (trustArg Trusted) "override trust setting" - , Option [] ["semitrust"] (ReqArg (Remote.forceTrust SemiTrusted) paramRemote) + , Option [] ["semitrust"] (trustArg SemiTrusted) "override trust setting back to default" - , Option [] ["untrust"] (ReqArg (Remote.forceTrust UnTrusted) paramRemote) + , Option [] ["untrust"] (trustArg UnTrusted) "override trust setting to untrusted" , Option ['c'] ["config"] (ReqArg setgitconfig "NAME=VALUE") "override git configuration setting" @@ -173,7 +173,8 @@ options = Option.common ++ "skip files smaller than a size" , Option ['T'] ["time-limit"] (ReqArg Limit.addTimeLimit paramTime) "stop after the specified amount of time" - , Option [] ["trust-glacier"] (NoArg (Annex.setFlag "trustglacier")) "Trust Amazon Glacier inventory" + , Option [] ["trust-glacier"] (NoArg (Annex.setFlag "trustglacier")) + "Trust Amazon Glacier inventory" ] ++ Option.matcher where setnumcopies v = maybe noop @@ -181,6 +182,8 @@ options = Option.common ++ (readish v) setgitconfig v = Annex.changeGitRepo =<< inRepo (Git.Config.store v) + trustArg t = ReqArg (Remote.forceTrust t) paramRemote + header :: String header = "Usage: git-annex command [option ..]" diff --git a/Limit.hs b/Limit.hs index e43b640da5..d7f82eb84f 100644 --- a/Limit.hs +++ b/Limit.hs @@ -51,7 +51,8 @@ getMatcher' = do Right r -> return r Left l -> do let matcher = Utility.Matcher.generate (reverse l) - Annex.changeState $ \s -> s { Annex.limit = Right matcher } + Annex.changeState $ \s -> + s { Annex.limit = Right matcher } return matcher {- Adds something to the limit list, which is built up reversed. -}