summaryrefslogtreecommitdiff
path: root/Command.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-11-13 14:59:27 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-11-13 14:59:27 -0400
commit5fa25a812a8a03af9f6a5fdb3d06eb4d89ee06f5 (patch)
tree467341e52d23660eee3dc05c9935c961801374e5 /Command.hs
parentd4d65a3c923de1eece50463145e875326bfe57e9 (diff)
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.
Diffstat (limited to 'Command.hs')
-rw-r--r--Command.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Command.hs b/Command.hs
index 21d636463..4180155fa 100644
--- a/Command.hs
+++ b/Command.hs
@@ -146,6 +146,16 @@ withTempFile a params = return $ map a params
withNothing :: SubCmdSeekNothing
withNothing a _ = return [a]
+{- Default to acting on all files matching the seek action if
+ - none are specified. -}
+withAll :: SubCmdSeekStrings -> SubCmdSeekStrings
+withAll w a params = do
+ if null params
+ then do
+ g <- Annex.gitRepo
+ w a [Git.workTree g]
+ else w a params
+
{- filter out files from the state directory -}
notState :: FilePath -> Bool
notState f = stateLoc /= take (length stateLoc) f