summaryrefslogtreecommitdiff
path: root/Command/Get.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/Get.hs
parentd036cd590f5c3c4edcd025effcf57c3d16886559 (diff)
move annex.numcopies parsing into withNumCopies
Diffstat (limited to 'Command/Get.hs')
-rw-r--r--Command/Get.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/Command/Get.hs b/Command/Get.hs
index bc617c9fa..4fd654f63 100644
--- a/Command/Get.hs
+++ b/Command/Get.hs
@@ -13,7 +13,6 @@ import qualified Remote
import Types
import Content
import Messages
-import Utility
import qualified Command.Move
command :: [Command]
@@ -23,8 +22,8 @@ command = [repoCommand "get" paramPaths seek
seek :: [CommandSeek]
seek = [withNumCopies start]
-start :: CommandStartAttrFile
-start (file, attr) = isAnnexed file $ \(key, _) -> do
+start :: FilePath -> Maybe Int -> CommandStart
+start file numcopies = isAnnexed file $ \(key, _) -> do
inannex <- inAnnex key
if inannex
then stop
@@ -37,8 +36,6 @@ start (file, attr) = isAnnexed file $ \(key, _) -> do
-- get --from = copy --from
src <- Remote.byName name
next $ Command.Move.fromPerform src False key
- where
- numcopies = readMaybe attr
perform :: Key -> CommandPerform
perform key = do