git-annex/Command/Untrust.hs

33 lines
656 B
Haskell
Raw Normal View History

2010-12-28 21:44:55 +00:00
{- git-annex command
-
- Copyright 2010 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.Untrust where
import Command
import qualified Remote
2010-12-28 21:44:55 +00:00
import UUID
import Trust
2010-12-28 21:44:55 +00:00
import Messages
command :: [Command]
command = [repoCommand "untrust" (paramRepeating paramRemote) seek
"do not trust a repository"]
seek :: [CommandSeek]
2010-12-28 21:44:55 +00:00
seek = [withString start]
start :: CommandStartString
start name = notBareRepo $ do
2010-12-28 21:44:55 +00:00
showStart "untrust" name
u <- Remote.nameToUUID name
return $ Just $ perform u
2010-12-28 21:44:55 +00:00
perform :: UUID -> CommandPerform
perform uuid = do
trustSet uuid UnTrusted
2010-12-28 21:44:55 +00:00
return $ Just $ return True