diff options
author | Joey Hess <joey@kitenet.net> | 2010-11-15 18:22:50 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-11-15 18:22:50 -0400 |
commit | 11096c200f4050c1e4cdb4fbab9410055c6e1c02 (patch) | |
tree | dbf8ef11c48fbf5ff9e2031d3280ff3e9bc8423b /Command | |
parent | d6f7ee7db46208d132f305ab651b0bf082be348e (diff) |
fsck no longer runs unused
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Fsck.hs | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/Command/Fsck.hs b/Command/Fsck.hs index a72d753fa..07621ad4e 100644 --- a/Command/Fsck.hs +++ b/Command/Fsck.hs @@ -8,8 +8,22 @@ module Command.Fsck where import Command -import qualified Command.FsckFile -import qualified Command.Unused +import qualified Backend +import Types +import Messages seek :: [SubCmdSeek] -seek = [withNothing Command.Unused.start, withAll withFilesInGit Command.FsckFile.start] +seek = [withFilesInGit start] + +{- Checks a file's backend data for problems. -} +start :: SubCmdStartString +start file = isAnnexed file $ \(key, backend) -> do + showStart "fsck" file + return $ Just $ perform key backend + +perform :: Key -> Backend -> SubCmdPerform +perform key backend = do + success <- Backend.fsckKey backend key + if (success) + then return $ Just $ return True + else return Nothing |