fsck no longer runs unused
This commit is contained in:
parent
d6f7ee7db4
commit
11096c200f
3 changed files with 20 additions and 16 deletions
|
@ -8,8 +8,22 @@
|
||||||
module Command.Fsck where
|
module Command.Fsck where
|
||||||
|
|
||||||
import Command
|
import Command
|
||||||
import qualified Command.FsckFile
|
import qualified Backend
|
||||||
import qualified Command.Unused
|
import Types
|
||||||
|
import Messages
|
||||||
|
|
||||||
seek :: [SubCmdSeek]
|
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
|
||||||
|
|
|
@ -124,12 +124,10 @@ Many git-annex subcommands will stage changes for later `git commit` by you.
|
||||||
Checks the annex for data that is not used by any files currently
|
Checks the annex for data that is not used by any files currently
|
||||||
in the annex, and prints a numbered list of the data.
|
in the annex, and prints a numbered list of the data.
|
||||||
|
|
||||||
(This is run as part of `git annex fsck`.)
|
|
||||||
|
|
||||||
* dropunused [number ...]
|
* dropunused [number ...]
|
||||||
|
|
||||||
Drops the data corresponding to the numbers, as listed by the last
|
Drops the data corresponding to the numbers, as listed by the last
|
||||||
`git annex unused` or `git annex fsck`
|
`git annex unused`
|
||||||
|
|
||||||
* find [path ...]
|
* find [path ...]
|
||||||
|
|
||||||
|
|
|
@ -311,8 +311,7 @@ You can use the fsck subcommand to check for problems in your data.
|
||||||
What can be checked depends on the [[backend|backends]] you've used to store
|
What can be checked depends on the [[backend|backends]] you've used to store
|
||||||
the data. For example, when you use the SHA1 backend, fsck will verify that
|
the data. For example, when you use the SHA1 backend, fsck will verify that
|
||||||
the checksums of your files are good. Fsck also checks that the annex.numcopies
|
the checksums of your files are good. Fsck also checks that the annex.numcopies
|
||||||
setting is satisfied for all files, and it warns about any dangling values
|
setting is satisfied for all files.
|
||||||
in `.git/annex/objects/`.
|
|
||||||
|
|
||||||
# git annex fsck
|
# git annex fsck
|
||||||
unused (checking for unused data...) ok
|
unused (checking for unused data...) ok
|
||||||
|
@ -332,13 +331,6 @@ Fsck never deletes possibly bad data; instead it will be moved to
|
||||||
might say about a badly messed up annex:
|
might say about a badly messed up annex:
|
||||||
|
|
||||||
# git annex fsck
|
# git annex fsck
|
||||||
unused (checking for unused data...)
|
|
||||||
Some annexed data is no longer pointed to by any files in the repository.
|
|
||||||
NUMBER KEY
|
|
||||||
1 WORM:1289672605:3:file
|
|
||||||
(To see where data was previously used, try: git log --stat -S'KEY')
|
|
||||||
(To remove unwanted data: git-annex dropunused NUMBER)
|
|
||||||
failed
|
|
||||||
fsck my_cool_big_file (checksum...)
|
fsck my_cool_big_file (checksum...)
|
||||||
Bad file content; moved to .git/annex/bad/SHA1:7da006579dd64330eb2456001fd01948430572f2
|
Bad file content; moved to .git/annex/bad/SHA1:7da006579dd64330eb2456001fd01948430572f2
|
||||||
** No known copies of the file exist!
|
** No known copies of the file exist!
|
||||||
|
@ -346,4 +338,4 @@ might say about a badly messed up annex:
|
||||||
fsck important_file
|
fsck important_file
|
||||||
Only 1 of 2 copies exist. Run git annex get somewhere else to back it up.
|
Only 1 of 2 copies exist. Run git annex get somewhere else to back it up.
|
||||||
failed
|
failed
|
||||||
git-annex: 3 failed
|
git-annex: 2 failed
|
||||||
|
|
Loading…
Reference in a new issue