summaryrefslogtreecommitdiff
path: root/Command/Drop.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-12-30 14:19:16 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-12-30 14:19:16 -0400
commit6a5be9d53cad9ee2988c6d54001f387dfe1f2716 (patch)
treebae7346474d2ae932b856f1d70a0fca187ca6454 /Command/Drop.hs
parent14d59b40fb4f3a4c9a89266fecae91a0daf08088 (diff)
rename some stuff and prepare to break out more into Command/*
Diffstat (limited to 'Command/Drop.hs')
-rw-r--r--Command/Drop.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Command/Drop.hs b/Command/Drop.hs
index 7c4fbea60..3f2740570 100644
--- a/Command/Drop.hs
+++ b/Command/Drop.hs
@@ -17,12 +17,12 @@ import Core
import Messages
import Utility
-seek :: [SubCmdSeek]
+seek :: [CommandSeek]
seek = [withAttrFilesInGit "annex.numcopies" start]
{- Indicates a file's content is not wanted anymore, and should be removed
- if it's safe to do so. -}
-start :: SubCmdStartAttrFile
+start :: CommandStartAttrFile
start (file, attr) = isAnnexed file $ \(key, backend) -> do
inbackend <- Backend.hasKey key
if not inbackend
@@ -33,14 +33,14 @@ start (file, attr) = isAnnexed file $ \(key, backend) -> do
where
numcopies = readMaybe attr :: Maybe Int
-perform :: Key -> Backend -> Maybe Int -> SubCmdPerform
+perform :: Key -> Backend -> Maybe Int -> CommandPerform
perform key backend numcopies = do
success <- Backend.removeKey backend key numcopies
if success
then return $ Just $ cleanup key
else return Nothing
-cleanup :: Key -> SubCmdCleanup
+cleanup :: Key -> CommandCleanup
cleanup key = do
inannex <- inAnnex key
when inannex $ removeAnnex key