fsck improvements
* fsck: Check if annex.numcopies is satisfied. * fsck: Verify the sha1 of files when the SHA1 backend is used. * fsck: Verify the size of files when the WORM backend is used. * fsck: Allow specifying individual files to fsk if fscking everything is not desired. * fsck: Fix bug, introduced in 0.04, in detection of unused data.
This commit is contained in:
parent
d4d65a3c92
commit
5fa25a812a
15 changed files with 236 additions and 31 deletions
|
@ -13,9 +13,10 @@ import Command
|
|||
import Types
|
||||
import Core
|
||||
import Messages
|
||||
import qualified Command.FsckFile
|
||||
|
||||
seek :: [SubCmdSeek]
|
||||
seek = [withNothing start]
|
||||
seek = [withNothing start, withAll withFilesInGit Command.FsckFile.start]
|
||||
|
||||
{- Checks the whole annex for problems. -}
|
||||
start :: SubCmdStart
|
||||
|
@ -26,11 +27,9 @@ start = do
|
|||
perform :: SubCmdPerform
|
||||
perform = do
|
||||
ok <- checkUnused
|
||||
if (ok)
|
||||
if ok
|
||||
then return $ Just $ return True
|
||||
else do
|
||||
showLongNote "Possible problems detected."
|
||||
return Nothing
|
||||
else return Nothing
|
||||
|
||||
checkUnused :: Annex Bool
|
||||
checkUnused = do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue