git-annex/Command/Untrust.hs
Joey Hess 140a351fc5 avoid version check before running version and upgrade commands
There are two types of commands; those that access the repository and those
that don't. Sorted.
2011-03-19 18:58:49 -04:00

35 lines
733 B
Haskell

{- 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 GitRepo as Git
import qualified Remotes
import UUID
import Trust
import Messages
command :: [Command]
command = [repoCommand "untrust" (paramRepeating paramRemote) seek
"do not trust a repository"]
seek :: [CommandSeek]
seek = [withString start]
start :: CommandStartString
start name = notBareRepo $ do
showStart "untrust" name
Remotes.readConfigs
r <- Remotes.byName name
return $ Just $ perform r
perform :: Git.Repo -> CommandPerform
perform repo = do
uuid <- getUUID repo
trustSet uuid UnTrusted
return $ Just $ return True