diff options
author | Joey Hess <joey@kitenet.net> | 2010-11-09 15:05:08 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-11-09 15:05:08 -0400 |
commit | 75d29250823326c8b4894a855927f65b5fdf4e13 (patch) | |
tree | a888b86d8e0569b9e1c388700dd6717aaa175834 /Command/Fsck.hs | |
parent | 377bf24d9a951186b374cd7a3f920b6bc9deb8f1 (diff) | |
parent | 8d5374f4a33f398baa166035e5fafb716a78fd1d (diff) |
Merge branch 'master' into checkout
Conflicts:
debian/changelog
doc/backends.mdwn
Diffstat (limited to 'Command/Fsck.hs')
-rw-r--r-- | Command/Fsck.hs | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/Command/Fsck.hs b/Command/Fsck.hs index 785aecd8a..5405ce120 100644 --- a/Command/Fsck.hs +++ b/Command/Fsck.hs @@ -8,19 +8,11 @@ module Command.Fsck where import qualified Data.Map as M -import System.Directory -import System.Posix.Files -import Monad (filterM) -import Control.Monad.State (liftIO) -import Data.Maybe import Command import Types import Core -import Locations -import qualified Annex -import qualified GitRepo as Git -import qualified Backend +import Messages {- Checks the whole annex for problems. -} start :: SubCmdStart @@ -71,22 +63,3 @@ unusedKeys = do existsMap :: Ord k => [k] -> M.Map k Int existsMap l = M.fromList $ map (\k -> (k, 1)) l - -getKeysPresent :: Annex [Key] -getKeysPresent = do - g <- Annex.gitRepo - let top = annexDir g - contents <- liftIO $ getDirectoryContents top - files <- liftIO $ filterM (isreg top) contents - return $ map fileKey files - where - isreg top f = do - s <- getFileStatus $ top ++ "/" ++ f - return $ isRegularFile s - -getKeysReferenced :: Annex [Key] -getKeysReferenced = do - g <- Annex.gitRepo - files <- liftIO $ Git.inRepo g $ Git.workTree g - keypairs <- mapM Backend.lookupFile files - return $ map fst $ catMaybes keypairs |