summaryrefslogtreecommitdiff
path: root/Command/Fsck.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-09-15 16:24:47 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-09-15 16:24:47 -0400
commit456b45b9b3982d9440a43ec014635dee15066f0e (patch)
tree18760407864d501595b0cf89de00c755a0105931 /Command/Fsck.hs
parentd036cd590f5c3c4edcd025effcf57c3d16886559 (diff)
move annex.numcopies parsing into withNumCopies
Diffstat (limited to 'Command/Fsck.hs')
-rw-r--r--Command/Fsck.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/Command/Fsck.hs b/Command/Fsck.hs
index 4e8eeb043..142f755a7 100644
--- a/Command/Fsck.hs
+++ b/Command/Fsck.hs
@@ -20,7 +20,6 @@ import qualified Types.Key
import UUID
import Types
import Messages
-import Utility
import Content
import LocationLog
import Locations
@@ -35,10 +34,10 @@ command = [repoCommand "fsck" paramPaths seek "check for problems"]
seek :: [CommandSeek]
seek = [withNumCopies start]
-start :: CommandStartAttrFile
-start (file, attr) = notBareRepo $ isAnnexed file $ \(key, backend) -> do
+start :: FilePath -> Maybe Int -> CommandStart
+start file numcopies = notBareRepo $ isAnnexed file $ \(key, backend) -> do
showStart "fsck" file
- next $ perform key file backend $ readMaybe attr
+ next $ perform key file backend numcopies
perform :: Key -> FilePath -> Backend Annex -> Maybe Int -> CommandPerform
perform key file backend numcopies = do