rename some stuff and prepare to break out more into Command/*

This commit is contained in:
Joey Hess 2010-12-30 14:19:16 -04:00
parent 14d59b40fb
commit 6a5be9d53c
24 changed files with 176 additions and 158 deletions

View file

@ -13,18 +13,18 @@ import Types
import Messages
import Utility
seek :: [SubCmdSeek]
seek :: [CommandSeek]
seek = [withAll (withAttrFilesInGit "annex.numcopies") start]
{- Checks a file's backend data for problems. -}
start :: SubCmdStartAttrFile
start :: CommandStartAttrFile
start (file, attr) = isAnnexed file $ \(key, backend) -> do
showStart "fsck" file
return $ Just $ perform key backend numcopies
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.fsckKey backend key numcopies
if success