This commit is contained in:
Joey Hess 2014-02-20 15:12:35 -04:00
parent 73ed2f8ec1
commit ae1e9f921b
4 changed files with 27 additions and 69 deletions

View file

@ -7,26 +7,13 @@
module Command.Untrust where
import Common.Annex
import Command
import qualified Remote
import Logs.Trust
import Types.TrustLevel
import Command.Trust (trustCommand)
def :: [Command]
def = [command "untrust" (paramRepeating paramRemote) seek
SectionSetup "do not trust a repository"]
seek :: CommandSeek
seek = withWords start
start :: [String] -> CommandStart
start ws = do
let name = unwords ws
showStart "untrust" name
u <- Remote.nameToUUID name
next $ perform u
perform :: UUID -> CommandPerform
perform uuid = do
trustSet uuid UnTrusted
next $ return True
seek = trustCommand "untrust" UnTrusted