diff options
author | Joey Hess <joey@kitenet.net> | 2011-06-01 19:10:38 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-06-01 19:11:27 -0400 |
commit | 971ab27e7820a3228f71dd42f3e870c0fc2f4345 (patch) | |
tree | f54a3fed5d3a161c5e6caff8954002f830ec8eed /GitAnnex.hs | |
parent | 80efafe4960e0fb33d1e6783bd34eaf459febea1 (diff) |
better types allowed breaking module dep loop
Diffstat (limited to 'GitAnnex.hs')
-rw-r--r-- | GitAnnex.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/GitAnnex.hs b/GitAnnex.hs index 64b0888b0..2a9fcbe3e 100644 --- a/GitAnnex.hs +++ b/GitAnnex.hs @@ -16,6 +16,7 @@ import Options import Utility import TrustLevel import qualified Annex +import qualified Remote import qualified Command.Add import qualified Command.Unannex @@ -104,10 +105,12 @@ 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) } + 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) } + settrust t v = do + r <- Remote.nameToUUID v + Annex.changeState $ \s -> s { Annex.forcetrust = (r, t):Annex.forcetrust s } header :: String header = "Usage: git-annex command [option ..]" |