From b5930f6d076d266b337b415447f448fbb14d9ea3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Dec 2011 19:22:43 -0400 Subject: [PATCH] add --- Command/Dead.hs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Command/Dead.hs diff --git a/Command/Dead.hs b/Command/Dead.hs new file mode 100644 index 0000000000..192551e207 --- /dev/null +++ b/Command/Dead.hs @@ -0,0 +1,32 @@ +{- git-annex command + - + - Copyright 2011 Joey Hess + - + - Licensed under the GNU GPL version 3 or higher. + -} + +module Command.Dead where + +import Common.Annex +import Command +import qualified Remote +import Logs.Trust + +def :: [Command] +def = [command "dead" (paramRepeating paramRemote) seek + "hide a lost repository"] + +seek :: [CommandSeek] +seek = [withWords start] + +start :: [String] -> CommandStart +start ws = do + let name = unwords ws + showStart "dead " name + u <- Remote.nameToUUID name + next $ perform u + +perform :: UUID -> CommandPerform +perform uuid = do + trustSet uuid DeadTrusted + next $ return True