diff options
author | Joey Hess <joey@kitenet.net> | 2013-11-07 14:12:13 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-11-07 14:12:13 -0400 |
commit | 40e10e3312d9127aff15a3dc22ea1a23499999cf (patch) | |
tree | d515a2c17604a151185577140b37bba3366696af /GitAnnex | |
parent | 37d9a6a9f477ee66f810cd5f4d3320734fca0c11 (diff) | |
parent | ff03a89236956904b617e02468102e5d390306bd (diff) |
Merge branch 'directguard'
Diffstat (limited to 'GitAnnex')
-rw-r--r-- | GitAnnex/Options.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/GitAnnex/Options.hs b/GitAnnex/Options.hs index 7f4cb60c2..88fad948a 100644 --- a/GitAnnex/Options.hs +++ b/GitAnnex/Options.hs @@ -11,6 +11,7 @@ import System.Console.GetOpt import Common.Annex import qualified Git.Config +import Git.Types import Command import Types.TrustLevel import qualified Annex @@ -59,12 +60,14 @@ options = Option.common ++ "Trust Amazon Glacier inventory" ] ++ Option.matcher where + trustArg t = ReqArg (Remote.forceTrust t) paramRemote setnumcopies v = maybe noop (\n -> Annex.changeState $ \s -> s { Annex.forcenumcopies = Just n }) (readish v) setuseragent v = Annex.changeState $ \s -> s { Annex.useragent = Just v } - setgitconfig v = Annex.changeGitRepo =<< inRepo (Git.Config.store v) - trustArg t = ReqArg (Remote.forceTrust t) paramRemote + setgitconfig v = inRepo (Git.Config.store v) + >>= pure . (\r -> r { gitGlobalOpts = gitGlobalOpts r ++ [Param "-c", Param v] }) + >>= Annex.changeGitRepo keyOptions :: [Option] keyOptions = |